I sometimes need to transfer files from one computer to another using SSH and I always forget how to do it so I decided to write a short post as a reminder.

To copy a file from one computer to another we use the scp command, which is very easy to use:

scp file.txt <remote user>@<some domain or ip>:<remote path>

The cool thing is that you can copy from the remote computer to your local computer inverting the order:

scp <remote user>@<some domain or ip>:<remote path to file> /home/adrian/

Finally, if you want to copy a folder with all it’s content you need to add a -r flag.

[ linux  productivity  ssh  ]
Getting familiar with Terraform linux productivity
Taking over existing instances with Terraform linux productivity
Terraform linux productivity
Autotools linux productivity
Playing with Kubernetes locally with Minikube linux productivity