Rsync to Amazon Ec2 Instance

前端 未结 5 974
面向向阳花
面向向阳花 2020-12-07 18:52

I have an EC2 instance running and I am able to SSH into it.

However, when I try to rsync, it gives me the error Permission denied (publickey).

The command

5条回答
  •  半阙折子戏
    2020-12-07 19:32

    Below is what I used and it worked. Source was ec2 and target was home machine.

     sudo rsync  -azvv -e "ssh -i /home/ubuntu/key-to-ec2.pem" ec2-user@xx.xxx.xxx.xx:/home/ec2-user/source/ /home/ubuntu/target/
    

提交回复
热议问题