Connecting to our servers with SSH
SSH (Secure Shell) is a program for securely logging onto a remote machine and then executing commands over an encrypted channel. It is intended to replace a number of standard utilities such as rlogin, rsh and telnet. By using encryption SSH prevents others from seeing the commands that are being sent between the user and the remote machine. It also uses public and private keys to validate that the host and client machines are who they say they are.
SSH not only provides a mechanism for securely sending remote commands, it also offers a way of securely copying files between two machines. There are two SSH utilities that provide these services: SCP and SFTP.
All three services (SSH, SCP and SFTP) are available at CSLab and they are one of the main ways to communicate with CSLab machines remotely.
SSH/SCP/SFTP on Windows
Modern Windows now offer native scp, ssh and sftp clients, all three accessible via a 'command prompt' window.
SSH on Linux: Command Line SSH, SCP and SFTP
Most Linux distributions come with SSH/SCP/SFTP installed. If not the OpenSSH website has excellent instructions on how to install it.
To SSH to one of the CSLab machines, use the syntax:
ssh -l username cs.toronto.edu
To invoke the SFTP client use the command:
sftp username@cs.toronto.edu
After logging in, use the "?" to see a list of SFTP commands.
To copy a file using SCP from your home directory to another machine and place it in the directory called "scarlet", use the syntax:
scp filename myusername@anothermachine:/scarlet/
To copy the file "begonias" from another machine to your current location, use the syntax:
scp myusername@anothermachine:/scarlet/begonias .
Please note the use of the '.' in the above command. It refers to your current directory so that the scp command literally means secure copy the file 'begonias' to my current location
SSH on Mac OS X
The Mac OS X comes with an SSH client installed already available for use. Simply open up a shell and use the commands detailed above in the Linux section.