【发布时间】:2016-07-04 11:21:47
【问题描述】:
所以我有一个 pem 文件:
./test.pem
我有一个文件要移动到我的实例:
path/to/my/file.csv
我想将它移动到我的 ec2 实例:
ec2-user@11.111.111.11
我尝试使用以下命令将文件 scp 到我的 ec2 主目录:
scp -i test.pem path/to/my/file.csv ec2-user@11.111.111.11:~
但它出于某种原因提示我输入密码。知道我在这里有什么问题吗?
-v 的输出:
Executing: program /usr/bin/ssh host 11.111.111.11, user ec2-user, command scp -v -d -t ~
OpenSSH_6.9p1, LibreSSL 2.1.8
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to 11.111.111.11 [11.111.111.11] port 22.
debug1: Connection established.
debug1: Local version string SSH-2.0-OpenSSH_6.9
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1
debug1: match: OpenSSH_6.6.1 pat OpenSSH_6.6.1* compat 0x04000000
debug1: Authenticating to 11.111.111.11:22 as 'ec2-user'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: xxxx-xxxx-xxxxxxxx
debug1: Host '11.111.111.11' is known and matches the ECDSA host key.
debug1: Found key in /Users/me/.ssh/known_hosts:19
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/me/.ssh/id_rsa
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Trying private key: /Users/me/.ssh/id_dsa
debug1: Trying private key: /Users/me/.ssh/id_ecdsa
debug1: Trying private key: /Users/me/.ssh/id_edxxxxx
debug1: Next authentication method: password
【问题讨论】:
-
你能用
-v选项发布scp的输出吗?
标签: amazon-web-services amazon-ec2 scp