ECE Remote Connection Tutorial


Connecting from Linux

Connecting to use the 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
  2. Accept the RSA key.
  3. Login as you normally would with your ECE username & password.

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
  2. Accept the RSA key.
  3. Login as you normally would with your ECE username & password.
  4. Run graphical applications from the terminal followed by an & (ampersand).
  • hostname is the name of an ECE machine listed here: Host Names

  • Connecting from Mac OS X

    Connecting to use the Command Line Interface

    1. Go to Finder -> Applications -> Utilities -> Terminal and open the terminal.

    2. From the terminal type:
      ssh -l username hostname
    3. 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 
    4. Accept the RSA key.
    5. Login as you normally would with your ECE username & password.
  • hostname is the name of an ECE machine listed here: Host Names

  • Connecting from Windows

    The ECE department recommends that you use the free, open source PuTTY program for SSH on Windows.
      For Programs with a Command Line Interface (CLI)
    1. Downloading & Installing PuTTY
    2. Connecting with PuTTY

    3. For Programs with a Graphical User Interface (GUI)
    4. Installing Xming with PuTTY
    5. Connecting with PuTTY & Xming

    Downloading & Installing PuTTY

    Putty is available in three forms: For the purposes of this tutorial, the functionality of all three installs are the same - so, take your pick.
    • Install with the default options.

    Connecting with PuTTY

    1. Start PuTTY by either double clicking the standalone exe or starting it from the Windows Start Menu.
    2. In the Host Name field, enter the name of the ECE machine you wish to connect to followed by .ece.ucdavis.edu.

      • Here is a list of machines you can connect to: Host Names



      • At this point, you should save your session settings to make it easier to connect to this machine in the future by typing a session name in the Saved Sessions text field and selecting Save.



      • After doing this, you can just double click on the name in the SavedSessions text box to connect to that machine.

    3. Once you have entered the machine name or selected a saved session, click open and accept the RSA key.



      • If you get a Potential Security Breach Warning like the one below and you are connecting to a grouped machine, select Yes and continue on.
      • If you aren't connecting to a grouped machine, and you receive this message, please e-mail

    4. Login as you normally would with your ECE username & password.

    Xming with PuTTY

    Xming can be used with PuTTY to run graphical applications remotely.

    Downloading & Installing Xming

    1. Install PuTTY
    2. Xming is available at:
      • Xming - The only required package is Xming
    3. Install with most of the default options; however,

      On the Select Components screen,
      • Select Don't Install an SSH Client.



      • You can also remove Non US Keyboard support, if you wish.

    4. If you are using the Windows Firewall, installing Xming punches a hole in your firewall so that anyone can connect to the X server running on your system. To prevent this:
      • Go to Start -> Control Panel -> Windows Firewall
      • Go to the Exceptions Tab and highlight, but do not decheck, 'Xming X Server'.
      • Click 'Edit' and then click 'Change scope...'
      • Select 'Custom list'
      • Put in 127.0.0.1 in the text field so that only your system can use the X server.

    Connecting with PuTTY & Xming

    1. Run Xming with the icon labeled Xming on your desktop or under Start -> Programs -> Xming
      • A message may appear concerning Xming acting as a server, Allow it
      • An X should appear in the taskbar notification area next to the taskbar clock.



    2. Now, run PuTTY either from the standalone exe or from the Windows Start Menu.
    3. On the left panel, navigate to Category -> Connection, double-click on SSH to expand its menu contents, and then navigate to X11, again on the left panel.
    4. Select Enable X11 forwarding

    5. Now, on the left panel, navigate to Category -> Session
    6. In the Host Name field, enter the name of the ECE machine you wish to connect to followed by .ece.ucdavis.edu
      • Here is a list of ECE machines you can connect to: Host Names



      • At this point, you should save your session settings to make it easier to connect to this machine in the future by typing a session name in the Saved Sessions text field and selecting Save.



      • After doing this, you can just double click on the name in the SavedSessions text box to connect to that machine.
    7. Once you have entered a machine name or selected a saved session, click open and accept the RSA key.



      • If you get a Potential Security Breach Warning like the one below and you are connecting to a grouped machine, select Yes and continue on.
      • If you aren't connecting to a grouped machine, and you receive this message, please e-mail



    8. Login as you normally would with your ECE username & password.
    9. You can now run graphical programs from the command line. For example, you can type xclock& to see if it works correctly.
    10. If you received font error messages, download and install the Xming-fonts package.


    Secure File Transfer

    The recommended and supported method to remotely access files is to use SCP or SFTP, which are functions of the SSH service.

    SCP and SFTP on Linux
    Fugu on Mac OS X
    WinSCP on Windows

    SCP and SFTP on Linux

    SCP is used to securely copy and retrieve files from a host
    1. To upload a file from the local system
      scp  SourceFile username@hostname:folder/TargetFile
      
    2. To upload a directory from the local system
      scp -r SourceDir username@hostname:TargetDir
      
    3. 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.
    1. To connect to a host using sftp
      sftp hostname
      
    2. Once connected, a call to help will show you the commands available
      help
      
    3. But the basic command to retrieve a file will be
      get path/SourceFilename
      
    4. And the basic command to upload a file will be
      put path/SourceFilename
      
    Please refer to Host Names for ECE hosts to connect to.

    Fugu on Mac OS X

    Users of Mac OS X can refer to Fugu for Mac OS X for secure file transfers.
    Also refer to Host Names for ECE hosts to connect to.

    WinSCP on Windows

    Downloading & Installing WinSCP

    Windows users can download and install the latest version of WinSCP in order to perform secure file transfers.
    1. Double-click the WinSCP installer
    2. Welcome to WinSCP Setup Wizard Screen
      • Click 'Next'.
    3. License Agreement Screen
      • Click 'Next'.
    4. Setup Type Screen
      • Leave the default as 'Typical' installation; Click 'Next'.
    5. Initial User Settings Screen
      • Here you can choose a preferred interface for the program.
      • The default, 'Norton Commander interface', works well; Click 'Next'.
    6. Ready to Install Screen
      • Click 'Next'.
    7. Completing the WinSCP Setup Wizard Screen
      • Uncheck the box for 'Launch WinSCP'; Click 'Finish'.
    Using WinSCP
    1. Once connected to a host, the interface lists the local directories on the left and the remote directories on the right.
    2. File transfers to and from the host can be accomplished by simply dragging and dropping files and/or folders between the interface divider.
    3. When you are finished with file transfers, you may exit the program as you would with any other program.
    Please refer to Host Names for ECE hosts to connect to.

    Related Links/Issues