# Secure Shell on macOS, Unix, and Linux

Any modern Unix-like operating systems should come with secure shell client utilities already installed. This is true for macOS, Ubuntu, Fedora, Mandrake Linux, FreeBSD and many others. If, however, you need a ssh client, you can download one from the openssh website: http://www.openssh.org.

1. Open a terminal. In macOS, you can find this in /Applications/Utilities/Terminal. An xterm or console window will work for other operating systems.
2. Type the following to connect, replacing USER with your user name. Your user name is likely the first two letters of your first name and your whole last name, all in lower case:
ssh USER@mote.cs.vassar.edu -p 443
It may take a few seconds to authenticate your connection.
3. If this is the first time connecting to the department, you will be given an error message similar to “The authenticity of host 'mote.cs.vassar.edu' (143.229.6.33)' can't be established.” and will be followed by the fingerprint: 9f:98:d5:06:14:59:7c:ce:75:4c:cf:81:12:ab:fd:7e. If this value matches, respond yes.
4. You will be prompted for your password. It is normal for no characters to appear when you type. Just press 'Enter' when you are done.

You should see a bunch of messages welcoming you to the computer science department system. The last line is the shell, waiting for you to type a command. If this is your first time using a shell, try typing ls to get a listing of files in your home directory.

When you have finished and want to end your connection, type exit into the shell.

It is possible to copy files over a network securely using both the sftp and scp programs. The sftp program gives you an interactive session in which you can list files on a remote computer, upload files to your department account, and download files to your computer. The scp program will copy one file or a group of files between computers and exit right away.

To start a sftp connection, type in a terminal sftp -P 443 USER@mote.cs.vassar.edu where USER is replaced by your user name. There are only a few commands necessary for using sftp:

 ls list files in current directory on remote computer get FILE copy FILE from remote computer put FILE copy FILE to remote computer !COMMAND execute COMMAND on local computer. For example, !ls will list files on your computer ? help - give a full listing of commands bye exit

To copy a file from your computer to your computer science account:
scp -P 443 FILE USER@mote.cs.vassar.edu:/home/USER where FILE is the file name (optionally with a path) and USER is your user name.

To copy a file from your computer science account to your computer:
scp -P 443 USER@mote.cs.vassar.edu:/home/USER/PATH_TO_FILE ./ where PATH_TO_FILE is the file and USER is your user name. Note, the path ./ means current directory as a path cannot be ommitted here. You can use man scp to find out more information about scp. One commonly used flag is -r, which is used to recursively copy whole directories. For example:
scp -P 443 -r DIRECTORY USER@mote.cs.vassar.edu:/home/USER

#### gFTP for X11

If you are using a Unix system running the X Window System, you can have a graphical front-end for SFTP and FTP transfers by using gFTP, available at http://gftp.seul.org or more easily as a package for your Linux distribution. Debian and Ubuntu users can do “sudo apt-get install gftp''. (Ubuntu users may need to add the universe repository to their /etc/apt/sources.list first. For more information, see this howto.)

Start up gFTP. In the main gFTP window your local files will be visible in the left pane. Change the transfer protocol from FTP to SSH (or SSH2) the control to do this is on the upper right side of the window next to the Stop button (the red circle with the white X in it). Then enter mote.cs.vassar.edu for host, and your username, click on the green Connect button on the left side of the toolbar. You will be prompted for your password. On logging in, you will see your CS account files on the right pane. You can transfer files between your computer and our systems by selecting the files and using the appropriate arrow buttons.

#### GUI clients for macOS

If you are using macOS and wish to have a graphical front end for copying files over a network, we suggest using Cyberduck or Fugu. Cyberduck is available at http://cyberduck.ch/ and Fugu is available at http://rsug.itd.umich.edu/software/fugu/. On running, you'll be asked a few questions. Enter mote.cs.vassar.edu in “Connect to”. Also, enter your user name. You can leave the port and starting directory settings blank, as their defaults, port 22 and your home directory, are apropriate. On logging in, you will see your local files in a pane on the left side of a window, and your account files on the right. Drag a file between the two panes to make a copy.

#### Other clients

There are many other graphical front ends that you might be interested in, both for macOS and for Linux including:

• Nautilus