Access to cs.umb.edu hosts from elsewhere, for CSIT115

 

Access to cs.umb.edu hosts from offsite Windows systems using the free Windows tools putty and pscp.

Of course this is not the only way to do file transfers. There are GUI clients that allow drag and drop file transfers after one overall login. See Bob Wilson's cs210 home page for an installer for such a GUI client for Windows. 

1.      Download putty.exe and pscp.exe from (for example) http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html. Putty allows you to login, and pscp gives you a command-line tool for file transfers.

 

2.      You can set up an icon to start putty. Use Windows Explorer to see the downloaded file, and right-click and select Create Shortcut, and then drag and drop the shortcut to your desktop background.  When you start putty, just fill in the hostname and click Open.

 

3.      Make sure that pscp.exe is on your path.  You can use the path command to see all the directories on your path. Put pscp.exe in one of these directories, or add its directory to your path by editing the PATH environment variable. Once this is set up, use a CMD window to do a file transfer as follows:

pscp myfile myusername@users.cs.umb.edu:it115/p1

to place the file in the p1 subdirectory of your it115 directory.  To transfer a whole directory of files from directory proj1 on your local machine to it115/p1 on UNIX, start from the directory above the proj1 directory:

            pscp –r proj1 myusername@users.cs.umb.edu:it115/p1

 

Access to cs.umb.edu hosts from offsite MacIntosh systems: All Mac systems come with scp and ssh, available once you use the Terminal application. You can just treat them the same way as linux1 in the above instructions.  For example, from your Terminal window:
ssh mycsusername@users.cs.umb.edu

 

for file transfer to the p1 directory:

scp myfile mycsusername@users.cs.umb.edu:it115/p1

For a whole directory named proj1:

pscp –r proj1 myusername@users.cs.umb.edu:it115/p1


Access to cs.umb.edu hosts from offsite Linux systems: All Linux systems come with scp and ssh, available once you get a shell window working. You can just treat them the same way in the above Mac instructions.


Using putty and pscp for access to cs.umb.edu systems from your Windows PC without entering passwords each time (Optional procedure)
These free and reliable tools work immediately on download, but expect you to enter a password for every use. With a little work, you can set up your environment to avoid the need to enter passwords so often. Unfortunately, the SSH tools on Windows and UNIX/Linux store the keys in slightly different file formats, so you need to fix up the putty key to use it on UNIX/Linux (or vice versa, of course.) 

1.      Download puttygen.exe and pageant.exe from the putty site.

2.      Use puttygen on Windows to generate a pair of keys, public and private, and save them in a .PPK file.  You can just carriage-return when asked for a passphrase (a passphrase would be a good idea for a shared laptop, but I’m assuming you have a privately owned machine.)

3.      Run pageant, and see a little icon on your system tray.

4.      Load the .PPK file into pageant by right-clicking it, etc. Now the putty tools on your system have easy access to the needed keys.

5.      But communication to our servers requires that they know the public key.  Copy the public key from the .PPK file (it starts with AAAA and goes on for four lines) to another file and remove the end-of-lines, resulting in one line of text starting with AAAA.  Add "ssh-rsa " to the beginning of the line, so the one line now looks like "ssh-rsa  AAAA..."  Put this text in a file called authorized_keys2.

6.      Create a directory named .ssh as a subdirectory of your login directory on UNIX (mkdir .ssh). Transfer authorized_keys2 to your new .ssh directory on UNIX.

7.      Now you should be able to login with ssh from your Windows PC without using a password. But if the format is a little wrong, you won't be able to log in at all.  So make sure you keep your older login alive when you try another test login with putty to see if your setup works.

8.      Test pscp to see you can transfer files without a password entry.

If you reboot your Windows machine, you need to run pageant again and load the PPK file.

 

Logging into cs.umb.edu hosts from Mac or Linux systems with ssh, without needing to enter a password (Optional procedure)

1.      Run "ssh-keygen" on, say, users.cs.umb.edu and answer its questions with carriage-returns.  This should create a well-protected .ssh directory in your login directory with files id_rsa and id_rsa.pub, holding the private and public keys, and file known_hosts.

2.      "cd .ssh", then "cp id_rsa.pub authorized_keys2".  If you already have an authorized_keys2 file, use the command "cat id_rsa.pub >> authorized_keys2" instead, to append the new key.

3.      Copy the .ssh directory to your own login directory on your home system (Mac or Linux)

4.      Test your setup by trying "ssh users2.cs.umb.edu from your home system. No password should be needed.

5.      scp will also work without passwords,.