Rodolfo Bandeira

Rodolfo Bandeira

software, electronics, security, devops, thoughts

Using SCP to copy files safely

How to transfer files safely? Don’t you know the SCP yet? (Secure Copy Protocol)

Do you know SCP ? This is a amazing tool to push or pull files using SSH with the same mechanisms for authentication of SSH.

As I always say.. let’s go to the examples!

From your computer to server running sshd:

scp SourceFile user@host:directory/TargetFile

From server to your computer:

scp user@host:directory/SourceFile TargetFile

From server to server:

scp SourceFile user@host:directory/TargetFile

So easy don’t you think? Yeah! And now the last tip:

From your computer to server using a specific ssh port:

scp -P YOUR_PORT SourceFile user@host:directory/TargetFile

Last modified:

LinkedIn
WhatsApp