To establish a connection to cs-class-1 from a Mac or a Linux or Unix machine, we use an ssh client executed from the command line. Instructions for Windows.
% ssh <netid>@class-1.cs.georgetown.eduwhere <netid> is your Georgetown Net ID. For example, I would type
% ssh maloofm@class-1.cs.georgetown.eduNote that it is possible to configure ssh so you can avoid typing your user name and the full machine name, such as
% ssh class-1
Here is a transcript of a short session, with things I've typed set in boldface:
hoya% ssh maloofm@class-1.cs.georgetown.edu maloofm@class-1.cs.georgetown.edu's password: Last login: Mon Jan 15 14:50:58 2007 from hoya.georgetown.edu cs-class-1% logout Connection to class-1.cs.georgetown.edu closed. hoya%
To transfer files to cs-class-1 from a Mac or Linux box, from the command-line, you can use sftp or you can download and use Filezilla. To use sftp, navigate to the directory on your computer that contains the files you wish to transfer.
scp * <netid>@class-1.cs.georgetown.edu:./hw1A transcript of a sample session when I did this follows:
hoya% ls HONOR main.cpp main.h Makefile numbers.cpp numbers.h hoya% scp * maloofm@class-1.cs.georgetown.edu:./hw1 maloofm@cs-class-1.cs.georgetown.edu's password: HONOR 100% 112 0.1KB/s 00:00 main.cpp 100% 150 0.2KB/s 00:00 main.h 100% 115 0.1KB/s 00:00 Makefile 100% 178 0.2KB/s 00:00 numbers.cpp 100% 312 0.3KB/s 00:00 numbers.h 100% 265 0.3KB/s 00:00 hoya%The asterisk (*) matches all files, but you can also use scp to transfer individual files or smaller groups of files. For example, the command
hoya% scp main.cpp maloofm@class-1.cs.georgetown.edu:./hw1transfers only main.cpp to cs-class-1, whereas
hoya% scp *.h maloofm@class-1.cs.georgetown.edu:./hw1transfers all the .h files, and
hoya% scp numbers.* maloofm@class-1.cs.georgetown.edu:./hw1transfers all of the files that start with "numbers.", which in this case, are numbers.cpp and numbers.h.
Note that while it is possible to do bulk transfers to a remote machine using scp, it is not possible to do so from a machine unless you have set up passwordless logins.. To do this, you need to use the secure file transfer program (sftp).
sftp <netid>@class-1.cs.georgetown.eduThis will establish a connection and prompt you for a password. If you give the correct password, then you get another prompt, the one that sftp presents. For example,
hoya% sftp maloofm@class-1.cs.georgetown.edu Connecting to cs-class-1... maloofm@class-1.cs.georgetown.edu's password: sftp>By default, sftp sets the current directory to the top-level directory.
sftp> mkdir hw1
sftp> cd hw1
sftp> pwd Remote working directory: /home/maloofm/hw1 sftp>
sftp> lpwd Local working directory: /home/maloof/cosc052/hw1 sftp>
sftp> put * Uploading HONOR to /home/maloofm/hw1/HONOR Makefile 100% 112 0.1KB/s 00:00 Uploading Makefile to /home/maloofm/hw1/Makefile Makefile 100% 178 0.2KB/s 00:00 Uploading main.cpp to /home/maloofm/hw1/main.cpp main.cpp 100% 150 0.2KB/s 00:00 Uploading main.h to /home/maloofm/hw1/main.h main.h 100% 115 0.1KB/s 00:00 Uploading numbers.cpp to /home/maloofm/hw1/numbers.cpp numbers.cpp 100% 312 0.3KB/s 00:00 Uploading numbers.h to /home/maloofm/hw1/numbers.h numbers.h 100% 265 0.3KB/s 00:00 sftp>As with the scp command, the asterisk (*) matches anything, and in this case, it matches all files. To transfer only main.cpp, type:
sftp> put main.cppTo transfer only the .cpp files, type:
sftp> put *.cppTo transfer only the .h files, type:
sftp> put *.hTo transfer main.cpp and main.h, type:
sftp> put main.*
sftp> get * Fetching /home/maloofm/hw1/HONOR to HONOR /home/maloofm/hw1/HONOR 100% 112 0.1KB/s 00:00 Fetching /home/maloofm/hw1/Makefile to Makefile /home/maloofm/hw1/Makefile 100% 178 0.2KB/s 00:00 Fetching /home/maloofm/hw1/main.cpp to main.cpp /home/maloofm/hw1/main.cpp 100% 150 0.2KB/s 00:00 Fetching /home/maloofm/hw1/main.h to main.h /home/maloofm/hw1/main.h 100% 115 0.1KB/s 00:00 Fetching /home/maloofm/hw1/numbers.cpp to numbers.cpp /home/maloofm/hw1/numbers.cpp 100% 312 0.3KB/s 00:00 Fetching /home/maloofm/hw1/numbers.h to numbers.h /home/maloofm/hw1/numbers.h 100% 265 0.3KB/s 00:00
sftp> help Available commands: cd path Change remote directory to 'path' lcd path Change local directory to 'path' chgrp grp path Change group of file 'path' to 'grp' chmod mode path Change permissions of file 'path' to 'mode' chown own path Change owner of file 'path' to 'own' help Display this help text get remote-path [local-path] Download file lls [ls-options [path]] Display local directory listing ln oldpath newpath Symlink remote file lmkdir path Create local directory lpwd Print local working directory ls [path] Display remote directory listing lumask umask Set local umask to 'umask' mkdir path Create remote directory progress Toggle display of progress meter put local-path [remote-path] Upload file pwd Display remote working directory exit Quit sftp quit Quit sftp rename oldpath newpath Rename remote file rmdir path Remove remote directory rm path Delete remote file symlink oldpath newpath Symlink remote file version Show SFTP version !command Execute 'command' in local shell ! Escape to local shell ? Synonym for help sftp>
sftp> quit hoya%
hoya% sftp maloofm@class-1.cs.georgetown.edu Connecting to class-1.cs.georgetown.edu... maloofm@class-1.cs.georgetown's password: sftp> mkdir hw1 sftp> cd hw1 sftp> pwd Remote working directory: /home/maloofm/hw1 sftp> lpwd Local working directory: /home/maloof/cosc052/hw1 sftp> put * Uploading HONOR to /home/maloofm/hw1/HONOR HONOR 100% 112 0.1KB/s 00:00 Uploading Makefile to /home/maloofm/hw1/Makefile Makefile 100% 178 0.2KB/s 00:00 Uploading main.cpp to /home/maloofm/hw1/main.cpp main.cpp 100% 150 0.2KB/s 00:00 Uploading main.h to /home/maloofm/hw1/main.h main.h 100% 115 0.1KB/s 00:00 Uploading numbers.cpp to /home/maloofm/hw1/numbers.cpp numbers.cpp 100% 312 0.3KB/s 00:00 Uploading numbers.h to /home/maloofm/hw1/numbers.h numbers.h 100% 265 0.3KB/s 00:00 sftp> quit hoya%