## Set Up Passwordless SSH

It is convenient to set up password-less SSH login to the cluster. This avoids retyping your password each time you want to transfer any data. This is also a necessary step if you want to set up SSHFS (see below).

### Mac/Linux/Windows 10

In systems with ssh-id-copy command the instructions can be found here. In OSX you have to transfer the public key file manually using the following command:

cat ~/.ssh/id_rsa.pub | ssh your-userID@argo.orc.gmu.edu "mkdir -p ~/.ssh; cat >> ~/.ssh/authorized_keys

You also must make sure your key file does not conflict with already existing keys or that you do not overwrite the authorized_keys file.

### Windows pre Windows 10

In order to login to your ARGO account using PuTTY without having to type in your password each time, you have to set up a key-file based authentication. First, download Putty from the GMU ITS downloads page. Save the file to your local disk. Open it, keep the default settings (SSH-2 RSA) and click the generate button. Do not add any additional passphrase. Save the file to a location of your choice. Now open PuTTY and login to your ARGO account as you normally would by typing your password. After you have logged in, go to the .ssh directory by typing:

cd ./.ssh

The directory should contain a file called authorized_keys (if not, you may need to send email to orchelp). Open the authorized_keys file -- you can use any command line unix text editor such as

vi or nano to do that:

nano authorized_keys

After which, open the saved key file on your computer, copy the public key portion (under the public-lines) and paste it in the authorized_keys file. Now add the keyword "ssh-rsa" at the beginning. The public key that you inserted may span multiple lines. You need to delete the carriage return at the end of each line and merge them into a single line. For a detailed tutorial on how to set up password-less ssh from windows, you may visit ssh-without-password-using-putty.

## Transferring Data

### Mac/Linux/Windows 10 (SCP)

Data, scripts and executables can be transferred via the scp command on UNIX-based systems. For example,

scp your_local_file_path userID@argo.orc.gmu.edu:~/your_cluster_folder_path

For downloading, just switch the source and destination paths. You can use the -r option to copy entire directory.

### Windows Pre Windows 10

#### Transferring using WinSCP

WinSCP is a user friendly, GUI based SSH transfer client. You can download WinSCP from winscp.net. Install and connect by providing your ARGO login credential as shown in the screenshots.

After logging into WinSCP, all you need to do is drag-n-drop from the left to right to transfer files.

#### Transferring using PSCP

Download PSCP from the PuTTY download page. It is a command line program, so you have to open it inside command-prompt (cmd.exe). You can only use the pscp command if the pscp executable is in your current directory. In order for Windows to recognize the command you need to add the path of the pscp executable to your environment variables list. You can access the environment variables by going to My Computer → Properties → Advanced System Settings → Environment Variables → System Variables → Path. You then select the PATH attribute and click the edit button to edit it. Append the absolute path of the pscp executable at the end of your current path string (do not replace the current path string). Click OK after you have finished editing. Note, you may need to restart your computer for the changes to take effect. Now open cmd.exe and type in the following command to transfer files to/from ARGO.

pscp [options] [user@]host:source target

For example,

pscp your-userID@argo.orc.gmu.edu:~/ c:\path\to\your\local\file.txt

Tutorial for how to use PSCP can be found here

## Transferring Data Using SSHFS(Optional)

You can install SSHFS (SSH File system) to mount remote volumes / folders in your local drive. For example you can type the following to mount your ARGO home directory as a local folder in your desktop. You can then directly edit files stored in your home folder on the cluster. Note, you need to set up password-less ssh before you can mount using SSHFS.

### Mac/Linux

sshfs -p 22 userID@argo.orc.gmu.edu: ~/Desktop/MyArgoHome/

To unmount, use the umount command:

umount ~/Desktop/MyArgoHome/

### Windows

Tutorial for setting up SSHFS on windows can be found at mounting remote file systems.