问题描述
我有一个EC2实例中运行。我也没有任何问题SSH:
的ssh -i mykey.pem EC2用户@ someIPaddress
。然而,SCP失败。运行此:
SCP -vvv -i mykey.pem test.txt的EC2用户@ someIPaddress:/ tmp目录/
产生以下结果:
执行:计划的/ usr / bin中/ SSH主机someIPadress,用户EC2用户,命令SCP -v -t的/ tmp /
OpenSSH_6.0p1 Debian的3ubuntu1,OpenSSL的1.0.1c 2012 5月10日
DEBUG1:读取配置数据的/ etc / SSH / ssh_config中
DEBUG1:在/ etc / SSH / ssh_config中第19行:申请选择*
DEBUG2:ssh_connect:needpriv 0
DEBUG1:连接到someIPaddress [someIPaddress]端口22。
DEBUG1:连接解决someIPadress端口22:网络不可达
SSH:连接到主机someIPaddress端口22:网络不可达
丢失了联系
其他的相关信息:
-
我的质子交换膜键具有读写权限,只为自己活着(-rw -------)。
-
有人告诉我,有可能是与SCP一个问题,如果可以运行/ bin /在EC2上真正产生一个非空行,但这不是这里的情况:
[EC2用户@ someIPaddress〜] $ / bin中/真 [EC2用户@ someIPaddress〜] $
-
我验证了test.txt的存在:)
-
我核实,我可以通过ssh登录写入/ tmp目录。
我感到意外的是SSH的作品,而不是SCP。任何想法?
编辑:运行
的ssh -vvv -i mykey.pem EC2用户@ someIP
生产:
OpenSSH_6.0p1 Debian的3ubuntu1,OpenSSL的1.0.1c 10五月2012
DEBUG1:读取配置数据的/ etc / SSH / ssh_config中
DEBUG1:在/ etc / SSH / ssh_config中第19行:申请选择*
DEBUG2:ssh_connect:needpriv 0
DEBUG1:连接到someIPaddress [someIPaddress]端口22。
DEBUG1:连接建立。
debug3:不正确的RSA1标识
debug3:无法加载mykey.pem作为一个RSA1公钥
DEBUG1:标识文件mykey.pem类型-1
DEBUG1:标识文件mykey.pem证书类型-1
DEBUG1:远程协议版本2.0,远程软件版本OpenSSH_6.1
DEBUG1:比赛:OpenSSH_6.1拍的OpenSSH *
DEBUG1:启用兼容模式协议2.0
DEBUG1:本地版本字符串SSH-2.0-OpenSSH_6.0p1 Debian的3ubuntu1
DEBUG2:FD 3设置O_NONBLOCK
debug3:load_hostkeys:从文件/home/burger/.ssh/known_hosts加载项主机someIPaddress
debug3:load_hostkeys:找到密钥类型RSA文件/home/burger/.ssh/known_hosts:3
debug3:load_hostkeys:装1项
debug3:order_hostkeyalgs:preFER hostkeyalgs:SSH-RSA-CERT-V01 @ openssh.com,支持SSH-RSA-CERT-V00 @ openssh.com,支持SSH-RSA
DEBUG1:SSH2_MSG_KEXINIT发
DEBUG1:收到SSH2_MSG_KEXINIT
DEBUG2:kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
DEBUG2:kex_parse_kexinit: [email protected],[email protected],ssh-rsa,[email protected],[email protected],[email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-dss
DEBUG2:kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
DEBUG2:kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
DEBUG2:kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
DEBUG2:kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
DEBUG2:kex_parse_kexinit:无,ZLIB @ openssh.com,ZLIB
DEBUG2:kex_parse_kexinit:无,ZLIB @ openssh.com,ZLIB
DEBUG2:kex_parse_kexinit:
DEBUG2:kex_parse_kexinit:
DEBUG2:kex_parse_kexinit:first_kex_follows 0
DEBUG2:kex_parse_kexinit:保留0
DEBUG2:kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
DEBUG2:kex_parse_kexinit:SSH-RSA,SSH-DSS
DEBUG2:kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
DEBUG2:kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
DEBUG2:kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
DEBUG2:kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
DEBUG2:kex_parse_kexinit:无,ZLIB @ openssh.com
DEBUG2:kex_parse_kexinit:无,ZLIB @ openssh.com
DEBUG2:kex_parse_kexinit:
DEBUG2:kex_parse_kexinit:
DEBUG2:kex_parse_kexinit:first_kex_follows 0
DEBUG2:kex_parse_kexinit:保留0
DEBUG2:mac_setup:发现HMAC-MD5
DEBUG1:KEX:服务器 - >客户AES128-CTR HMAC-MD5无
DEBUG2:mac_setup:发现HMAC-MD5
DEBUG1:KEX:客户 - >服务器AES128-CTR HMAC-MD5无
DEBUG1:SSH2_MSG_KEX_DH_GEX_REQUEST(1024< 1024< 8192)派
DEBUG1:期待SSH2_MSG_KEX_DH_GEX_GROUP
DEBUG2:dh_gen_key:私法键位设置:二百五十六分之一百三十九
DEBUG2:位设置:一千零二十四分之四百八十一
DEBUG1:SSH2_MSG_KEX_DH_GEX_INIT发
DEBUG1:期待SSH2_MSG_KEX_DH_GEX_REPLY
DEBUG1:服务器主机密钥:RSA somekey
debug3:load_hostkeys:从文件/home/burger/.ssh/known_hosts加载项主机someIPaddress
debug3:load_hostkeys:找到密钥类型RSA文件/home/burger/.ssh/known_hosts:3
debug3:load_hostkeys:装1项
DEBUG1:主机'someIPaddress是已知的和RSA主机密钥相匹配。
DEBUG1:在/home/burger/.ssh/known_hosts:3找到关键
DEBUG2:位设置:一千零二十四分之五百二十三
DEBUG1:ssh_rsa_verify:签名正确
DEBUG2:kex_derive_keys
DEBUG2:set_newkeys:模式1
DEBUG1:SSH2_MSG_NEWKEYS发
DEBUG1:期待SSH2_MSG_NEWKEYS
DEBUG2:set_newkeys:模式0
收到SSH2_MSG_NEWKEYS:DEBUG1
DEBUG1:由服务器不允许漫游
DEBUG1:SSH2_MSG_SERVICE_REQUEST SENT
DEBUG2:service_accept:SSH-USERAUTH
DEBUG1:收到SSH2_MSG_SERVICE_ACCEPT
DEBUG2:关键:mykey.pem((无))
DEBUG1:身份验证,可以继续:公钥
debug3:从头开始,通过不同的列表公钥
debug3:preferred GSSAPI-keyex,GSSAPI与 - 麦克风,公钥,键盘交互,密码
debug3:authmethod_lookup公钥
debug3:剩余的preferred:键盘交互,密码
debug3:authmethod_is_enabled公钥
DEBUG1:下一个身份验证方法:公钥
DEBUG1:尝试私钥:mykey.pem
DEBUG1:读PEM私钥进行:输入RSA
debug3:sign_and_send_pubkey:RSA一些键
DEBUG2:我们发送的公钥包,等待回复
DEBUG1:验证成功(公钥)。
验证到someIPaddress([someIPaddress]:22)。
DEBUG1:通道0:新[客户端会话]
debug3:ssh_session2_open:channel_new:0
DEBUG2:通道0:发送开放
DEBUG1:请求[email protected]
DEBUG1:进入互动环节。
DEBUG2:回调开始
DEBUG2:client_session2_setup:ID 0
DEBUG2:FD 3设置TCP_NODELAY
debug3:packet_set_tos:设置IP_TOS为0x10
DEBUG2:通道0:请求PTY-REQ确认1
DEBUG1:发送环境。
debug3:忽略ENV rvm_gemsets_path
debug3:忽略ENV rvm_scripts_path
debug3:忽略ENV SSH_AGENT_PID
debug3:忽略ENV rvm_bin_path
debug3:忽略ENV GEM_HOME
debug3:忽略ENV rvm_man_path
debug3:忽略ENV TERM
debug3:忽略ENV SHELL
debug3:忽略ENV XDG_SESSION_COOKIE
debug3:忽略ENV IRBRC
debug3:忽略ENV rvm_user_path
debug3:忽略ENV rvm_wrappers_path
debug3:忽略ENV WINDOWID
debug3:忽略ENV rvm_patches_path
debug3:忽略ENV OLDPWD
debug3:忽略ENV GNOME_KEYRING_CONTROL
debug3:忽略ENV MY_RUBY_HOME
debug3:忽略ENV rvm_docs_path
debug3:忽略ENV GTK_MODULES
debug3:忽略ENV rvm_verbose_flag
debug3:忽略ENV用户
debug3:忽略ENV LS_COLORS
debug3:忽略ENV rvm_gems_cache_path
debug3:忽略ENV rvm_config_path
debug3:忽略ENV XDG_SESSION_PATH
debug3:忽略ENV rvm_path
debug3:忽略ENV XDG_SEAT_PATH
debug3:忽略ENV rvm_debug_flag
debug3:忽略ENV SSH_AUTH_SOCK
debug3:忽略ENV DEFAULTS_PATH
debug3:忽略ENV XDG_CONFIG_DIRS
debug3:忽略ENV rvm_ preFIX
debug3:忽略ENV rvm_examples_path
debug3:忽略ENV路径
debug3:忽略ENV DESKTOP_SESSION
debug3:忽略ENV rvm_rubies_path
debug3:忽略ENV rvm_loaded_flag
debug3:忽略ENV PWD
debug3:忽略ENV GNOME_KEYRING_PID
DEBUG1:发送ENV LANG =的en_US.UTF-8
DEBUG2:通道0:请求ENV确认0
debug3:忽略ENV MANDATORY_PATH
debug3:忽略ENV UBUNTU_MENUPROXY
debug3:忽略ENV rvm_usr_path
debug3:忽略ENV GDMSESSION
debug3:忽略ENV rvm_version
debug3:忽略ENV rvm_src_path
debug3:忽略ENV首页
debug3:忽略ENV SHLVL
debug3:忽略ENV rvm_gems_path
debug3:忽略ENV _JAVA_AWT_WM_NONREPARENTING
debug3:忽略ENV rvm_ruby_string
debug3:忽略ENV rvm_tmp_path
debug3:忽略ENV LOGNAME
debug3:忽略ENV GEM_PATH
debug3:忽略ENV rvm_lib_path
debug3:忽略ENV XDG_DATA_DIRS
debug3:忽略ENV DBUS_SESSION_BUS_ADDRESS
debug3:忽略ENV rvm_repos_path
debug3:忽略ENV LESSOPEN
debug3:忽略ENV rvm_reload_flag
debug3:忽略ENV rvm_log_path
debug3:忽略ENV rvm_help_path
debug3:忽略ENV XDG_RUNTIME_DIR
debug3:忽略ENV显示
debug3:忽略ENV rvm_environments_path
debug3:忽略ENV RUBY_VERSION
debug3:忽略ENV rvm_archives_path
debug3:忽略ENV LESSCLOSE
debug3:忽略ENV rvm_user_install_flag
debug3:忽略ENV COLORTERM
debug3:忽略ENV XAUTHORITY
debug3:忽略ENV _
DEBUG2:通道0:请求壳确认1
DEBUG2:回调做起来难
DEBUG2:通道0:打开确认RWindow对象0 RMAX 32768
DEBUG2:channel_input_status_confirm:99式ID 0
接受通道0 PTY分配请求:DEBUG2
DEBUG2:通道0:RCVD调整2097152
DEBUG2:channel_input_status_confirm:99式ID 0
接受了通道0外壳要求:DEBUG2
上次登录:星期五5月31日14时18分38秒2013年stgt-5f7197c5.pool.mediaways.net
__ | __ | _)
_ | (/亚马逊Linux的AMI
___ | \ ___ | ___ |
https://aws.amazon.com/amazon-linux-ami/2013.03-release-notes/
[EC2用户@ IP-someIPaddress〜] $
这个问题的另一个原因(SCP失败的地方SSH成功)是一种登录时的任何消息打印到控制台(例如:从你的.bashrc脚本)
另请参见
- http://superuser.com/questions/395356/scp-doesnt-work-but-ssh-does
- https://stackoverflow.com/questions/12440287/scp-doesnt-work-when-echo-in-bashrc
I have an EC2 instance running. I can ssh with no problems:
ssh -i mykey.pem ec2-user@someIPaddress
. However, scp fails. Running this:
scp -vvv -i mykey.pem test.txt ec2-user@someIPaddress:/tmp/
produces the following result:
Executing: program /usr/bin/ssh host someIPadress, user ec2-user, command scp -v -t /tmp/
OpenSSH_6.0p1 Debian-3ubuntu1, OpenSSL 1.0.1c 10 May 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to someIPaddress [someIPaddress] port 22.
debug1: connect to address someIPadress port 22: Network is unreachable
ssh: connect to host someIPaddress port 22: Network is unreachable
lost connection
Additional infos:
My .pem key has read and write permissions only for myself (-rw-------).
I was told that there might be a problem with scp if running /bin/true on EC2 produces a non-empty line, but this is not the case here:
[ec2-user@someIPaddress ~]$ /bin/true [ec2-user@someIPaddress ~]$
I verified that test.txt exists :)
I verified that I can write into /tmp by logging in via ssh.
I am surprised that ssh works, but not scp. Any ideas?
Edit: Running
ssh -vvv -i mykey.pem ec2-user@someIP
produces:
OpenSSH_6.0p1 Debian-3ubuntu1, OpenSSL 1.0.1c 10 May 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to someIPaddress [someIPaddress] port 22.
debug1: Connection established.
debug3: Incorrect RSA1 identifier
debug3: Could not load "mykey.pem" as a RSA1 public key
debug1: identity file mykey.pem type -1
debug1: identity file mykey.pem-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.1
debug1: match: OpenSSH_6.1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.0p1 Debian-3ubuntu1
debug2: fd 3 setting O_NONBLOCK
debug3: load_hostkeys: loading entries for host "someIPaddress" from file "/home/burger/.ssh/known_hosts"
debug3: load_hostkeys: found key type RSA in file /home/burger/.ssh/known_hosts:3
debug3: load_hostkeys: loaded 1 keys
debug3: order_hostkeyalgs: prefer hostkeyalgs: [email protected],[email protected],ssh-rsa
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: [email protected],[email protected],ssh-rsa,[email protected],[email protected],[email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,[email protected],zlib
debug2: kex_parse_kexinit: none,[email protected],zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,[email protected]
debug2: kex_parse_kexinit: none,[email protected]
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_setup: found hmac-md5
debug1: kex: server->client aes128-ctr hmac-md5 none
debug2: mac_setup: found hmac-md5
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug2: dh_gen_key: priv key bits set: 139/256
debug2: bits set: 481/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA somekey
debug3: load_hostkeys: loading entries for host "someIPaddress" from file "/home/burger/.ssh/known_hosts"
debug3: load_hostkeys: found key type RSA in file /home/burger/.ssh/known_hosts:3
debug3: load_hostkeys: loaded 1 keys
debug1: Host 'someIPaddress' is known and matches the RSA host key.
debug1: Found key in /home/burger/.ssh/known_hosts:3
debug2: bits set: 523/1024
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: mykey.pem ((nil))
debug1: Authentications that can continue: publickey
debug3: start over, passed a different list publickey
debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Trying private key: mykey.pem
debug1: read PEM private key done: type RSA
debug3: sign_and_send_pubkey: RSA some-key
debug2: we sent a publickey packet, wait for reply
debug1: Authentication succeeded (publickey).
Authenticated to someIPaddress ([someIPaddress]:22).
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug2: callback start
debug2: client_session2_setup: id 0
debug2: fd 3 setting TCP_NODELAY
debug3: packet_set_tos: set IP_TOS 0x10
debug2: channel 0: request pty-req confirm 1
debug1: Sending environment.
debug3: Ignored env rvm_gemsets_path
debug3: Ignored env rvm_scripts_path
debug3: Ignored env SSH_AGENT_PID
debug3: Ignored env rvm_bin_path
debug3: Ignored env GEM_HOME
debug3: Ignored env rvm_man_path
debug3: Ignored env TERM
debug3: Ignored env SHELL
debug3: Ignored env XDG_SESSION_COOKIE
debug3: Ignored env IRBRC
debug3: Ignored env rvm_user_path
debug3: Ignored env rvm_wrappers_path
debug3: Ignored env WINDOWID
debug3: Ignored env rvm_patches_path
debug3: Ignored env OLDPWD
debug3: Ignored env GNOME_KEYRING_CONTROL
debug3: Ignored env MY_RUBY_HOME
debug3: Ignored env rvm_docs_path
debug3: Ignored env GTK_MODULES
debug3: Ignored env rvm_verbose_flag
debug3: Ignored env USER
debug3: Ignored env LS_COLORS
debug3: Ignored env rvm_gems_cache_path
debug3: Ignored env rvm_config_path
debug3: Ignored env XDG_SESSION_PATH
debug3: Ignored env rvm_path
debug3: Ignored env XDG_SEAT_PATH
debug3: Ignored env rvm_debug_flag
debug3: Ignored env SSH_AUTH_SOCK
debug3: Ignored env DEFAULTS_PATH
debug3: Ignored env XDG_CONFIG_DIRS
debug3: Ignored env rvm_prefix
debug3: Ignored env rvm_examples_path
debug3: Ignored env PATH
debug3: Ignored env DESKTOP_SESSION
debug3: Ignored env rvm_rubies_path
debug3: Ignored env rvm_loaded_flag
debug3: Ignored env PWD
debug3: Ignored env GNOME_KEYRING_PID
debug1: Sending env LANG = en_US.UTF-8
debug2: channel 0: request env confirm 0
debug3: Ignored env MANDATORY_PATH
debug3: Ignored env UBUNTU_MENUPROXY
debug3: Ignored env rvm_usr_path
debug3: Ignored env GDMSESSION
debug3: Ignored env rvm_version
debug3: Ignored env rvm_src_path
debug3: Ignored env HOME
debug3: Ignored env SHLVL
debug3: Ignored env rvm_gems_path
debug3: Ignored env _JAVA_AWT_WM_NONREPARENTING
debug3: Ignored env rvm_ruby_string
debug3: Ignored env rvm_tmp_path
debug3: Ignored env LOGNAME
debug3: Ignored env GEM_PATH
debug3: Ignored env rvm_lib_path
debug3: Ignored env XDG_DATA_DIRS
debug3: Ignored env DBUS_SESSION_BUS_ADDRESS
debug3: Ignored env rvm_repos_path
debug3: Ignored env LESSOPEN
debug3: Ignored env rvm_reload_flag
debug3: Ignored env rvm_log_path
debug3: Ignored env rvm_help_path
debug3: Ignored env XDG_RUNTIME_DIR
debug3: Ignored env DISPLAY
debug3: Ignored env rvm_environments_path
debug3: Ignored env RUBY_VERSION
debug3: Ignored env rvm_archives_path
debug3: Ignored env LESSCLOSE
debug3: Ignored env rvm_user_install_flag
debug3: Ignored env COLORTERM
debug3: Ignored env XAUTHORITY
debug3: Ignored env _
debug2: channel 0: request shell confirm 1
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel_input_status_confirm: type 99 id 0
debug2: PTY allocation request accepted on channel 0
debug2: channel 0: rcvd adjust 2097152
debug2: channel_input_status_confirm: type 99 id 0
debug2: shell request accepted on channel 0
Last login: Fri May 31 14:18:38 2013 from stgt-5f7197c5.pool.mediaways.net
__| __|_ )
_| ( / Amazon Linux AMI
___|\___|___|
https://aws.amazon.com/amazon-linux-ami/2013.03-release-notes/
[ec2-user@ip-someIPaddress ~]$
Another cause of this problem (SCP failing where SSH succeeds) is having any message printed to the console during login (e.g. from your .bashrc script)
See also
- http://superuser.com/questions/395356/scp-doesnt-work-but-ssh-does
- https://stackoverflow.com/questions/12440287/scp-doesnt-work-when-echo-in-bashrc
这篇关于SCP亚马逊EC2失败,但ssh的作品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!