Open Source Support Forum

Please or Register to create posts and topics.

How to copy folder from local to a remote machine through ssh

How to copy a folder from local to a remote machine (lets say to 172.16.1.135) through ssh:

scp -r /mnt/backup username@172.16.1.135:/home/username/clones

where /mnt/backup is the folder to be copied, username is the remote machine's username,
172.16.1.135 is the remote machine's ip, and clones is the destination folder

simply replace the desired data with your own..and REMEMBER:
give the full path to the remote folder!

(tested on Ubuntu 16.04 server,it may work with other versions and distro's)