usage is scp source_file user@ip_addr:/path_where_to_put_files
Keep in mind that source and destination are allways in this order ,
if willing to copy from ssh to local then reverse values
scp user@IP:/path_to_source local_destination
if ssh port differs from 22 then use scp -P port_number and the above
Eg.
Quote:
scp test gabriel@1.2.3.4:/home/gabriel/Desktop/
|
or specify port number
Quote:
scp -P 22 test gabriel@1.2.3.4:/home/gabriel/Desktop/
|
where test is local file to push , and Desktop is the final path
If willing to save as a different name use
Quote:
scp test gabriel@1.2.3.4:/home/gabriel/Desktop/test_file_renamed
|
To copy from ssh server to local then
Quote:
scp gabriel@1.2.3.4:/home/alpha_centauri/source_file /home/obi_wan_kenoby/
|
My ssh uses RSA so no user/passwd plain text is broadcast , make sure you do the same by using private/public keys instead of user/passwd
If willing to execute command along ssh connections then use
ssh user@IP 'command1;command2;command3' or multiple commands separated between
eg.
Quote:
ssh gabriel@1.2.3.4 'cd /home/user/ ; ls'
|