Ubuntu Linux secure copy to / from server

This post is more of a note to my self this is all running on a Ubuntu 12.04 machine.  You can do all of this from your local Ubuntu machine and do not need to login on remote server via ssh.

Copy folder FROM server TO local machine using command line 


Remote folder :  /var/www/someRemoteFolderName
destination folder on local machine: /var/www/localFolderName
username:  bob
ip or dns: mydomainName

Command is :

root@mdiener-VirtualBox:# scp -r bob@mydomainName://var/www/someRemoteFolderName/ /var/www/localFolderName 

then enter password at the prompt


Copy folder TO server FROM local machine using command line

Remote folder is :  /var/www/someRemoteFolderName
destination folder on local machine: /var/www/localFolderName
username:  bob
ip or dns: mydomainName

Command is :

root@mdiener-VirtualBox:# scp -r /var/www/localFolderName bob@mydomainName://var/www/someRemoteFolderName/ 

then enter password at the prompt

This is simply the reverse of the first one.

Well that was easy !  Linux is great

Comments

Popular Posts