Example 1: scp folder from server to local
scp -r user@your.server.example.com:/path/to/foo /home/user/Desktop/
Example 2: ssh copy folder from local to remote
scp -ra /path/to/local/storage user@remote.host:/path/to/copy
Example 3: how to copy directory to a ssh server
scp -r /path/to/directory user@ipaddress:/path/to/destination
scp -r user@ipaddress:/path/to/destination /path/to/directory
Example 4: copy from remote to local
scp file.txt remote_username@10.10.0.2:/remote/directory
Example 5: ssh copy folder from local to remote
scp -r -P xxxx /path/of/your/local/folder username@hostname:/path/to/remote/server/folder
Example 6: ssh copy folder from local to remote
scp -P xxxx username@hostname:/path/of/remote/server/filename /path/to/local/destination/folder
Comments
Post a Comment