How to transfer files from a linux host via SCP.

First, check if SCP is installed: just type the command on terminal without any parameters:

or example:(if you get an output just like the below, scp is installed and you are good to go)

tokunbo@debian7:~$ scp
usage: scp [-12346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
[-l limit] [-o ssh_option] [-P port] [-S program]
[[user@]host1:]file1 ... [[user@]host2:]file2
tokunbo@debian7:~$

The following is a sample command to copy a file from source(local linux host) to destination(remote linux host):

command: scp -r testdir This email address is being protected from spambots. You need JavaScript enabled to view it.:/homepages/37/d290169812/htdocs
where:

= "testdir" contains the files on my localhost, and "-r" is for recursive copying(copy everything),

= " This email address is being protected from spambots. You need JavaScript enabled to view it. is the username at the remote domain-name / IP-address,

= "/homepages/37/d290169812/htdocs" = sample-directory where files are to be transfered to

You have no rights to post comments