SSH and SCP

From OESF

Jump to: navigation, search

You will need the terminal to use SSH and SCP

Instructions for SSH and SCP


To log onto your Zaurus or a linux box, the commands are as follow:

 $> ssh <username>@<remotehost>

where <username> is the login name you have on the machine named <remotehost>.  %%%The $> denotes where the prompt starts. **DO NOT TYPE $>**. An example is

 $> ssh blair@foo.clarku.edu

After typing this command you will be asked to enter your password. After entering your password for that machine< you will be logged in. All traffic between the terminal where you are working and the remote machine will be encrypted.


Due to the fact that protocols such as FTP and RCP do not utilize encryption of passwords or data, we must use scp for the transfer of files over an open WLAN connection. This command has the same usage as SSH. To copy a file from where you are working to a remote machine, the command is

 $> scp <file> <username>@<remotehost>:{<directory>}

where <directory> is optional. If the directory is not given after the colon, the file will be saved in your home directory

The statement

 $> scp foo.java blair@foo.clarku.edu:java

will save the file foo.java to my directory java/ on the machine foo.clarku.edu.

To retrieve a file from a remote machine, the order is reversed:

 $> scp blair@foo.clarku.edu:java/foo.java ./java

will bring foo.java from the java directory on foo and save it to the java directory where I am giving the scp command. To save to the home directory the ./<dirname> is just a . /

The nice thing about this is this will work on almost any linux box that has ssh on it.

Personal tools