How would you write a command which would securely copy your bashrc file from a remote computer to your home directory on your local computer?

Answer:
Transferring the file through ssh would keep it secure. There are many options; A few examples are listed below. Run 'man <program name>' for the full program manual.


sftp - secure file transfer program
$ sftp user@host:.bashrc ~/.


rsync - a fast, versatile, remote (and local) file-copying tool
$ rsync user@host:.bashrc ~/.


scp - secure copy (remote file copy program)
$ scp user@host:.bashrc ~/.
First answer by 374jguyg. Last edit by 374jguyg. Contributor trust: 1 [recommend contributor recommended]. Question popularity: 20 [recommend question].