next up previous contents
Next: Using SSH/SCP with Keys Up: SSH/SCP Previous: Introduction   Contents

Using SSH/SCP without Keys

The simplest way to login in remotely or copy files is to use SSH/SCP without keys. Try the following:-

  1. Login to PPLXGEN.

  2. Use SSH to login to PPSLGEN by typing:-

    ssh ppslgen

    You should be prompted for your password and then will be logged into PPSLGEN.

    When you do this for the very first time SSH will tell you that it cannot confirm the authenticity of the remote machine and asks for confirmation. The idea is that every machine running SSH has a unique ``fingerprint'' and SSH records in the file:-

    $HOME/.ssh/known_hosts

    the list of fingerprints of the hosts you use. Then if some hacker attempts to redirect your traffic to their machine the fingerprint won't match and SSH will refuse to connect. Occasionally a machine will be upgraded and its fingerprint will change. To get SSH to connect you will have to remove the old entry from $HOME/.ssh/know_hosts. Obviously you should only do this is you are expecting a change!

  3. Type

    exit

    to return to PPLXGEN.

Other points about using SSH:-

To transfer files to a remote machine:-

scp local-file remote-file-spec

and to transfer files from a remote machine:-

scp remote-file-spec local-file

where remote-file-spec syntax is:-

user-name@remote-machine:remote-directory/remote-file

and takes defaults as follows:-

user-name@
The local username (like SSH).

remote-directory/
The home directory for the remote user on the remote machine.

local-file/remote-file
The destination file name may be omitted in which case the source file name is used..

A couple of examples:-

scp my-file ppslgen:
Copy local my-file to the home directory of my account on PPLXINT.

scp west@pplxint9.physics.ox.ac.uk:migrate/that-file this-file
Copy that-file from the migrate directory of account west on PPLXINT to local this-file.

Of course copying files between pplxint8 and pplxint9 is quite pointless - the same disks are visible from both machines, but it does demonstrate the principle.

Copying can involve wild-carding, if used remotely you have to enclose the remote-file-spec in double quotes to prevent the local shell attempting to expand the wild-card characters. For example:-

scp *.dat west@pplxint9.physics.ox.ac.uk:migrate/
scp "west@pplxint9.physics.ox.ac.uk:migrate/*.dat" ./


next up previous contents
Next: Using SSH/SCP with Keys Up: SSH/SCP Previous: Introduction   Contents
P.D. Gronbech (IT Staff) 2015-10-02