CommandLine : How to copy a file from a server using a public key ?

The command to copy files from others server is : scp user@server:/filepath/filename

If you need connect with your public key :

scp -i <yourkey> youruser@server:/pathfile/filename .

Example :

 scp -i ~/.ssh/mykey .

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s