Skip to content [Tab]
~/posts/devops/how-to-download-or-upload-file-from-vps.md
$ stat -x how-to-download-or-upload-file-from-vps.md POSIX filesystem
Access Mode: -rw-r--r-- (0644)
Author: uid:1000(@f7234bv9s8)
File Size: 1.1 KB (98 words)
Modified:
Flags: --cat="devops,software,web"

How to download or upload file from VPS

attachment://featured-image.webp

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
@f7234bv9s8 maintainer

Software engineer and writer at notes:own:vision:com.