Information Technology
Using SSH to Login and Copy Files

15-May-2008


Introduction

Logins and file transfers to the Shared Computing Resources are accomplished by using SSH.  The following describes how to use SSH on a Unix or Linux system to login to these systems from on campus and how to use SCP to transfer files.  All of the instructions below assume that you are logging in to these systems from on campus.


How to Login with SSH

The following are valid SSH commands that can be used to login:


ssh username@hostname.rice.edu
         
ssh hostname.rice.edu -l username

Substitute the hostname of the system you are logging in to in place of hostname.rice.edu and substitute your username in place of username.

The very first time you login, you will receive the following reply from SSH:



[anyuser@anyhost ~]$ ssh hostname.rice.edu
The authenticity of host 'hostname.rice.edu (128.42.60.102)' can't be established.
DSA key fingerprint is 65:fe:78:0d:7e:6e:a3:9c:ec:63:cb:ae:7c:f6:40:4d.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'hostname.rice.edu,128.42.60.102' (DSA) to the list of known hosts.
username@hostname.rice.edu's password: 
         
      

Future attempts to login will only result in you being prompted for your password unless you are using a different desktop system.  Each time you change to a different desktop system, you will be greeted with this message from SSH.


How to Transfer Files with SCP

In order to transfer files from your Linux or Unix desktop, use the scp (Secure Copy) command which is a component of SSH.  The following example will transfer files from your desktop to your home directory on the remote system:


[anyuser@anyhost ~]$ scp filename username@hostname.rice.edu:
username@hostname.rice.edu's password:
filename                                100%  889     0.9KB/s   00:00


Substitute the hostname of the system you are logging in to in place of hostname.rice.edu and substitute your username in place of username.

After you enter your password, scp will display a list of all files transferred along with their size and transfer speed. 



How to Login or Transfer Files from Off-Campus

Direct logins and file transfers from off-campus are not allowed.  Please see our Off-Campus Access FAQ for details on connecting from off-campus.


Using SSH on Mac or Windows

The OS X operating system on the Macintosh already has SSH as part of its default installation and will work the same way as described above from a terminal window.   A Windows version of SSH can be obtained on our Software Distribution Page.  The Windows version of SSH is a graphical program, not command line oriented like the examples above.  It contains a Secure Shell Client for logins and a Secure Shell File Transfer program which is a substitute for scp. Instructions on using the Windows version are available in our FAQ.  

 

IT
Division of Information Technology
MS-119, P.O. Box 1892, Rice University, Houston, Texas 77251-1892
713-348-HELP(4357)