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 camila.macedo@myhost.com.br:/mydir/temp/myfile.txt .

Leave a Reply

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

WordPress.com Logo

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

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s