On this page
copy files over ssh
If you want to send files from your laptop to the computer you ssh into run the scp
(Secure Copy) command:
scp <ip>:<from> <to>
# or
scp <from> <ip>:<to>
example:
# currently on ssh sever
# my computer -> ssh server
scp john@192.168.69.69:~/file.txt ~/my_folder/
# currently on my computer
# ssh server -> my computer
scp admin@192.168.69.420:~/file.txt ~/my_folder/
Note: it has the same flags as cp
so you are able to copy folders with the -r
flag
# currently on my computer
# ssh server -> my computer
scp -r admin@192.168.69.420:~/my_cool_folder ~/my_folder/