copy files from ssh to local code example

Example 1: scp send file

scp ./file.txt remote_username@remote_ip:/remote/directory

Example 2: ssh transfer file from local to remote

scp file.txt remote_username@10.10.0.2:/remote/directory

Example 3: using scp

scp remote_username@10.10.0.2:/remote/file.txt /local/directory

Example 4: copy file from ssh server to local

scp host_name:file_server path_local

Example 5: copy files from local to host ssh

$ scp * remoteuser@remoteserver:/remote/folder/

Example 6: ssh copy folder from local to remote

scp username@hostname:/path/of/remote/server/filename /path/to/local/destination/folder

Tags:

C Example