When managing servers sometime it’s needed to move files between remote hosts and local machines. It can be backup files, configs etc. One way it so setup Samba and connect to network storage and share files. Another way is to user CLI command “scp”
Download file from remote host:
$ scp username@host_ip_address:/path/to/file location/on/local/machine
Using ssh key
$ scp -i .ssh/keyfile username@host_ip_address:/path/to/file location/on/local/machine
Upload file to remove host
$ scp -i .ssh/keyfile location/on/local/machine username@remote:/location/on/remote/host
Leave a Reply