first of all what is scp ?
here's a quote direct from the top of the command
Code:
man scp
Quote:SCP(1) BSD General Commands Manual SCP(1)
NAME
scp - secure copy (remote file copy program)
SYNOPSIS
scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
[-l limit] [-o ssh_option] [-P port] [-S program]
[[user@]host1:]file1 [...] [[user@]host2:]file2
it's the same as cp (copy) except secure as you are doing it over an ssh connection. When you start an scp session to a target box, you will be prompted for the users ssh password, this is normal and signifys to you that this is a secure transfer.
here's the usage
Code:
scp -prP port file user@ip:./
where port=the ssh listening port on the target linux box
where file=the file you want to send to the target
where user=the username you ssh in as
where ip=the ip address of the target box
where :./=the home directory of the user you are ssh'ing as
and
-p =Preserves modification times, access times, and modes from the original file.
-P=capital P for port as -p is already taken from above.
-r=recursively copy entire directories.
so a real example of the above would be like
Quote:[anyweb@localhost ~]$ scp -prP 1234 SC_160_P_ESD1.zip anyweb@213.64.12.34:./anyweb@213.64.12.34's password:
SC_160_P_ESD1.zip 100% 29MB 255.2KB/s 01:58
thanks to P38 and jY for the advice.
cheers
anyweb