SCP (Secure copy) commands:
Using SCP command, you can copy file/directory over the network securely from remote machine or to local machine.
1. Copy file from local to remote machine:
scp -p 2217 test.txt remoteHost@192.168.0.01:/home/kali/Note: Here, -p is PORT. If default port is 22. If default port is honoured by remote machine, then port is optional, test.txt is the file which is copied to remote machine. Remember about ":" after remote machine address.
2. Copy file from remote machine to local machine:
scp remoteHost@192.168.0.01:/home/kali/test.txt ./Note: It is almost same as above example. The main difference is we are coping file from remote machine to local machine, so we have to say remote machine address after "scp". My remote machine honoured default port, therefore, I do not need to declare it.
Hmmm.....How do I copy a directory.... :-)?
You just need to add another argument, -r. For example: scp -r ....
Comments
Post a Comment