0

I tried to execute scp/rsync command between two of my EC2 servers but I got the error as be low snapshot.

Normally when I ssh connect to my servers via PuTTY, I need to attach a private key. So what I can guess is that the command is requiring the keys.

How can I add the key in the command?

enter image description here

halfer
  • 19,824
  • 17
  • 99
  • 186
Nam G VU
  • 33,193
  • 69
  • 233
  • 372

1 Answers1

2

man scp would display an option -i:

  -i identity_file
         Selects the file from which the identity (private key) for RSA authentication is read.  This option is directly passed to ssh(1).

Since the option is passed to ssh (as noted above), it can be passed to rsync: -e "ssh -i /path/to/private/key"

devnull
  • 118,548
  • 33
  • 236
  • 227
  • Thanks for suggesting an edit on my answer in http://stackoverflow.com/questions/16395375/create-a-path-from-lines-in-a-file-on-the-unix-command-line/16395410#16395410 . I don't know why it was rejected. Anyway, I updated it and now it is fine. – fedorqui May 06 '13 at 09:21