scp (secure copy) to ec2 instance without password

前端 未结 14 1867
野性不改
野性不改 2020-12-02 03:32

I have an EC2 instance running (FreeBSD 9 AMI ami-8cce3fe5), and I can ssh into it using my amazon-created key file without password prompt, no problem.

However, whe

14条回答
  •  生来不讨喜
    2020-12-02 04:02

    write this code

    scp -r -o "ForwardAgent=yes" /Users/pengge/11.vim root@192.168.2.228:/root/
    

    If you have a SSH key with access to the destination server and the source server does not, adding -o "ForwardAgent=yes" will allow you to forward your SSH agent to the source server so that it can use your SSH key to connect to the destination server.

提交回复
热议问题