HowTos:Connect to login servers via ssh
In order to open a terminal session to one of our login servers (math.princeton.edu or pacm.princeton.edu) you have to use SSH. SSH stands for "Secure Shell" and it is an encrypted protocol. SSH ensures your password and all of your communication inside a session are kept safe from eavesdropping. SSH also allows you to copy files to and from your Math/PACM account (through SCP - secure copy).
Please follow instructions for the operating system you are using.
- 1 Use SSH in your browser with a Java applet/Web SSH
- 2 Use SSH on a Microsoft Windows computer
- 3 Use SSH on an Mac OS X computer
- 4 Use SSH on a Linux/Unix computer
Use SSH in your browser with a Java applet/Web SSH
If you are using a browser with a Java plugin then you can just open up one of the links found on our Main_Page for Web SSH. I.e. either a http://math.princeton.edu/ssh.html or http://math.princeton.edu/ssh/access-separatenew.shtml (different version, try if the first doesn't work). If the browser and Java plugin are properly configured then the Web SSH applet will open and you will be asked your username and password.
This method is particularly usefull on public computers or any other computer where it would be difficult to install an SSH program.
Use SSH on a Microsoft Windows computer
On Windows we recommend two SSH programs - "PuTTY" and/or "SSH Secure Shell Client". "PuTTY" is smaller and easier to install but "SSH Secure Shell Client" has a nice graphical interface to copy files to and from your Math/PACM account that resembles Windows Explorer.
Download and use PuTTY
PuTTY can be downloaded from the authors website (look for PuTTY for Windows x86) or just directly pickup the latest version. Download PuTTY somewhere where you can easily use it, for example to your Desktop.
Now run PuTTy - i.e. find where you downloaded it (probably Desktop) and double click on its icon. You will get a "PuTTY Configuration" window where you should type for "Host Name" math.princeton.edu or pacm.princeton.edu (1) and then click on "Open" (2):
If this is the first time you are using PuTTY to connect to this login server on your machine then you are likely to be prompted to confirm the encryption key is correct as in the following window, just click on "Yes" (1):
You will then be prompted for your username and your password and that's it.
Download, install and use SSH Secure Shell Client
Download and install
You should first download the SSHSecureShell executable from SSH.com FTP server, the current version as of writing this document is SSHSecureShellClient-3.2.9.exe but if it is not available anymore check the ftp directory and download the newest version. Run the executable and install the program by following installers directions.
Use SSH Secure Shell Client
Run the "SSH Secure Shell Client" by double clicking on its icon. By default the installer will add "SSH Secure Shell Client" and "SSH Secure File Transfer Client" icons to your Desktop, if not you will be able to find these shortcuts under "Start Menu"->"All Programs"->"SSH Secure Shell".
In the "SSH Secure Shell" window click on "Quick Connect" (1):
and then in the "Connect to Remote Host" dialog type in the "Host name" (1) (math.princeton.edu or pacm.princeton.edu), your username (2) and finally click on "Connect" (3):
If this is the first time you are connecting with "SSH Secure Shell" to math/pacm.princeton.edu then you will be asked to confirm the identity of remote host by clicking on "Yes" (1):
Finally, you will be asked for your password (1):
Use SSH Secure File Transfer
Once connected with the SSH Secure Shell client you can also use it to copy files back and forth to your Math/PACM account. In order to do that click on the file transfer icon (1):
This will bring up a two pane window, with left side being your local file system (of the machine you are currently using) and on the right side you will see files and folders in your Math/PACM account. You can then just drag and drop the files from one side to the other:
Use SSH on an Mac OS X computer
Use SSH on a Linux/Unix computer
Most Linux/Unix distributions/operating systems these days come with ssh preinstalled. To use it just open a terminal and type:
The first time you connect to either math or pacm login machine you might be asked to confirm the authenticity of the remote host:
The authenticity of host 'math.princeton.edu (18.104.22.168)' can't be established. RSA key fingerprint is 8c:03:12:2e:e5:2e:a0:72:22:ab:38:90:52:3f:73:ea. Are you sure you want to continue connecting (yes/no)?
Confirm by typing in yes (you have to type the full world, just y will not be sufficient) after which you will be prompted for your password.
Copy files with scp
You can use scp to copy files between systems. Some examples follow, in each case you will be prompted for your Math/PACM password after typing in the command.
Copy a file from your local machine to your Math/PACM account's home directory:
scp localfile.tex firstname.lastname@example.org:
copy a whole directory dirtocopy from your local machine to your Math/PACM account's subdirectory subdir:
scp -r dirtocopy email@example.com:subdir/
copy from your math account a file mathfile.tex located in mathdir subdir in your Math/PACM account to current directory on local machine:
scp firstname.lastname@example.org:mathdir/mathfile.teg .
copy a whole director mathsubdir from subdir math of your Math/PACM account to the local machine's directory /data/math:
scp -r email@example.com:math/mathsubdir /data/math