Remote Connection

Remote Connection Tutorial

Remote Connection Tutorial

Prior to following any of the steps in the sections below, connect to the Campus VPN.
Connecting to the COE VPN is not necessary.
  • Connecting to Kemper 2107 from Linux
  • Connecting using a terminal/command line interface
    1)  From a terminal type:
    ssh -l username hostname
    If you receive an error message that ends with Host key verification failed, and if you are connecting to a grouped machine such as snake.ece.ucdavis.edu, you will need to remove the offending ssh key.
    ssh-keygen -R snake.ece.ucdavis.edu
    If you aren’t connecting to a grouped machine, and you receive this message,
    please e-mail coeithelp@ucdavis.edu
    2)  Accept the RSA key.
    3)  Login as you normally would with your campus username and password.
    campus

    Connecting to use Graphical Interfaces
    1) From a terminal in an X-windows environment type:
    ssh -X -l username hostname
    If you receive an error message that ends with Host key verification failed, and if you are connecting to a grouped machine such as snake.ece.ucdavis.edu, you will need to remove the offending ssh key.
    ssh-keygen -R snake.ece.ucdavis.edu
    If you aren’t connecting to a grouped machine, and you receive this message, please e-mail coeithelp@ucdavis.edu
    2)  Accept the RSA key.
    3)  Login as you normally would with your campus username and password.
    4)  Run graphical applications from the terminal followed by an & (ampersand).
    hostname is the name of an ECE machine listed here: 
     

    Undergraduate Instructional Labs
    Note: The software you wish to use may not be available on a system in a different lab room than the room(s) assigned to your course.
    To connect to a grouped machine in Kemper 2107 use: snake.ece.ucdavis.edu

    Faculty
    Faculty have a hostname aliased to a Linux system which they can connect to.
    To connect to the faculty machine use: fac-linux.ece.ucdavis.edu
    Note: this is not grouped. If you receive a host key mismatch when connecting, please send an e-mail to coeithelp@ucdavis.edu

  • Connecting to Kemper 2107 from macOS
  • Connecting using a terminal/command line interface
    1) Go to Finder -> Applications -> Utilities -> Terminal and open the terminal.
    2) From the terminal type:
    ssh -l username hostname
    If you receive an error message that ends with Host key verification failed, and if you are connecting to a grouped machine such as snake.ece.ucdavis.edu, you will need to remove the offending ssh key.
    ssh-keygen -R snake.ece.ucdavis.edu
    3) Accept the RSA key.
    4) Login as you normally would with your campus username and password.
    5) hostname is the name of an ECE machine found in Kemper 2107.
  • Connecting to Kemper 2107 from Windows
  • Windows Subsystem for Linux can provide a Linux terminal within Windows 10. Once you have it installed, you can follow the Linux-based directions to use ssh at the command-line to connect.

    Windows Terminal for Windows 10 can provide a terminal experience much like Linux or MacOS.

  • Secure File Transfer on Linux
  • SCP is used to securely copy and retrieve files from a host.

    To upload a file from the local system
    scp  SourceFile username@hostname:folder/TargetFile

    To upload a directory from the local system
    scp -r SourceDir username@hostname:TargetDir

    To retrieve a file from the remote system
    scp username@hostname:folder/SourceFile TargetFile


    SFTP is used to securely connect to a host and interactively transfer files. It can also be used in the same manner and format as scp. NOTE: SFTP cannot copy directories.

    To connect to a host using sftp
    sftp hostname

    Once connected, a call to help will show you the commands available
    help

    But the basic command to retrieve a file will be
    get path/SourceFilename

    And the basic command to upload a file will be
    put path/SourceFilename

    Also refer to Host Names for ECE hosts to connect to.

  • Secure File Transfer on macOS
  • See Installing and Using FileZilla 

    Refer to Host Names for ECE hosts to connect to.
  • Secure File Transfer on Windows
  • See Installing and Using FileZilla 

    Please refer to Host Names for ECE hosts to connect to.

  • Logging Into Snake Lab (Kemper 2107) with VNC
  • The Linux workstations in Kemper 2107 can be logged into remotely through TigerVNC to remotely run graphical programs. Here is a quick guide to getting a VNC session up and running:

    1)  Download TigerVNC’s VNCViewer

    If on Linux you can usually install it from the package manager for your distribution. If on OSX or Windows you can find the installers on this page:

    http://tigervnc.bphinz.com/nightly/

    2)  SSH into a snake machine and set it up for VNC

    For the purposes of this demo, I will be using queen (queen.ece.ucdavis.edu). When you set up your own VNC session you can of course use any host in the snake lab.

    After logging in through SSH, the first thing to do is run ‘setup vnc’. This will set up the graphical environment for when you log in through VNC later. If you don’t do this step, you will be greeted by a blank screen when you log in through VNC.

    Next, run vncserver. You can use the manual page (man vncserver) to see how to set the screen size and other useful settings.

    3)  Run the VNC Viewer

    From your local machine, run the vncviewer from TigerVNC, set the server and session number (the same session number displayed when you ran vncserver) like so:

    Then, click ‘options’ and go to the security tab, and set only TLS with anonymous certificates, or, if you happen to have X509 certificates, TLS with X509 certificates.

    Click ‘OK’ and then ‘Connect.’ A prompt will ask for your VNC password. If you chose TLS with anonymous certificates in the previous step, there will be a banner that says ‘insecure.’ You can safely ignore this, as it it just TigerVNC’s way of saying “X509 certificates are more secure than anonymous certificates. I would prefer you used those, but whatever.”

    You should see a graphical desktop environment through the VNC viewer at this point. When you are done with your VNC session, make sure to kill it from the server via ssh with vncserver -kill :2 (or whatever session number your vnc session was using).

    That’s it! If you have any trouble, you can always contact us at coeithelp@ucdavis.edu.

  • Having Trouble Running Graphical Programs?
  • Check our software to see if there is a solution for the software you are using.