Lecture 12
A few more useful things
- Secure shell connection: ssh . Usage ssh username@address , better yet ssh -X username@address (works on most machines),
or on some machines
you can do even better ssh -Y username@address .
The "X" (or "Y" ) options
are better for running X-terminal remotely. For example, if you do
ssh -X alexey@ap1.cs.vt.edu you can then run xdvi
or acroread on remote machine alexey@ap1.cs.vt.edu and have the screen "exported"
to your local machine.
After typing ssh , you will be prompted for your UNIX password on ap1.cs.vt.edu .
That password
will be safely encrypted before it goes across the net to ap1.cs.vt.edu,
and so will everything else you type once you are logged into
ap1.cs.vt.edu.
Once you are done, just type exit
at the prompt.
- On windows, you can use PUTTY to ssh-connect to a UNIX machine.
However, you won't be able to have full graphics capabilities (X-terminal, etc). Just basic text. There is a way to export X-term, but it is not as simple.
- Secure copy: scp file alexey@ap1.cs.vt.edu: copies file to the top directory of alexey's account on ap1.cs.vt.edu machine. Note the ":" after machine name - it is important. Here is a more versatile command: sftp alexey@ap1.cs.vt.edu .
Puts you into the remote directory. You can do ls , cd
and a few other things. get file retrieves file from the
remote machine to the directory where you invoked sftp . put file - sends a local file to the remote machine.
- If you are on a Windows machine, install WinSCP for secure
file transfer. Macs have UNIX (basically a version of BSD)
underneath, so you don't need anything extra.
- Pine -- a fast and friendly mail client. Available for UNIX, and also for
Windows.
- Archiving data: tar -cvf my_archive.tar /home/alexey/* creates
a "tar" archive of everything in /home/alexey/ . Usually, you
want to follow it by gzip my_archive.tar to get a compressed
archive my_atchive.tar.gz . To uncompress and unpack:
gunzip my_atchive.tar.gz followed by tar -xvf my_archive.tar