问题描述
- ssh_exchange_identification:
-
有谁帮我看一下这个问题
wangwenjun@ubuntu:~$ ssh -v localhost
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Executing proxy command: exec ssh -q -W localhost:22 192.168.1.1
debug1: identity file /home/wangwenjun/.ssh/identity type -1
debug1: identity file /home/wangwenjun/.ssh/identity-cert type -1
debug1: permanently_drop_suid: 1000
debug1: identity file /home/wangwenjun/.ssh/id_rsa type -1
debug1: identity file /home/wangwenjun/.ssh/id_rsa-cert type -1
debug1: identity file /home/wangwenjun/.ssh/id_dsa type -1
debug1: identity file /home/wangwenjun/.ssh/id_dsa-cert type -1
ssh_exchange_identification: Connection closed by remote hostssh_exchange_identification: Connection closed by remote host我的ssh_conf文件是
Host *
ForwardAgent no
ForwardX11 no
ForwardX11Trusted yes
RhostsRSAAuthentication no
RSAAuthentication yes
PasswordAuthentication yes
HostbasedAuthentication no
GSSAPIAuthentication no
GSSAPIDelegateCredentials no
GSSAPIKeyExchange yes
GSSAPITrustDNS yes
BatchMode no
CheckHostIP yes
AddressFamily any
ConnectTimeout 0
StrictHostKeyChecking ask
IdentityFile ~/.ssh/identity
IdentityFile ~/.ssh/id_rsa
IdentityFile ~/.ssh/id_dsa
Port 22
Protocol 2,1
Cipher 3des
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
EscapeChar ~
Tunnel no
TunnelDevice any:any
PermitLocalCommand yes
VisualHostKey no
ProxyCommand ssh -q -W %h:%p 192.168.1.1
RekeyLimit 1G 1h
SendEnv LANG LC_*
解决方案
http://blog.csdn.net/cafecheng/article/details/1770163
解决方案二:
将系统 /run/sshd 目录的权限设置为 775,即同组用户可写, 会导致ssh连接出错 ->
ssh 错误: ssh_exchange_identification: Connection closed by remote host......
答案就在这里:ssh 错误: ssh_exchange_identification