ssh file transfer

transfer files via ssh
SSH into the other machine: ssh remoteIP
scp -rp /path/filename username@remoteIP:/path #Copy the local file to the server
scp -rp username@remoteIP:/path/filename /path #Download the remote file from the server to the local

tar cvzf - /path/ | ssh username@remoteip "cd /some/path/; cat -> path.tar.gz" #Compressed transmission
tar cvzf - /path/ | ssh username@remoteip "cd /some/path/; tar xvzf -" #Compressed transmission a directory and unzip
 
 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327065636&siteId=291194637