ubuntu服务器系统密码认证失败,密码的ssh认证失败,因为“无法加载主机密钥”...

我无法从Windows客户端密码认证到Ubuntu的服务器为SSH。 UBuntu上的ssh版本是OpenSSH_5.8p1 Debian-7ubuntu1,OpenSSL 1.0.0e,而Windows客户端上的SSH版本是OpenSSH_5.1p1,OpenSSL 0.9.8k。我打开SSH调试,发现服务器和客户端的消息:

/usr/bin/sshd -d -p 2222 on server

[email protected]:~/.ssh$ /usr/sbin/sshd -d -p 2222

debug1: sshd version OpenSSH_5.8p1 Debian-7ubuntu1

debug1: could not open key file '/etc/ssh/ssh_host_rsa_key': Permission denied

Could not load host key: /etc/ssh/ssh_host_rsa_key

debug1: could not open key file '/etc/ssh/ssh_host_dsa_key': Permission denied

Could not load host key: /etc/ssh/ssh_host_dsa_key

debug1: could not open key file '/etc/ssh/ssh_host_ecdsa_key': Permission denied

Could not load host key: /etc/ssh/ssh_host_ecdsa_key

debug1: setgroups() failed: Operation not permitted

debug1: rexec_argv[0]='/usr/sbin/sshd'

debug1: rexec_argv[1]='-d'

debug1: rexec_argv[2]='-p'

debug1: rexec_argv[3]='2222'

Set /proc/self/oom_score_adj from 0 to -1000

debug1: Bind to port 2222 on 0.0.0.0.

Server listening on 0.0.0.0 port 2222.

debug1: Bind to port 2222 on ::.

Server listening on :: port 2222.

debug1: Server will not fork when running in debugging mode.

debug1: rexec start in 5 out 5 newsock 5 pipe -1 sock 8

debug1: inetd sockets after dupping: 3, 3

Connection from 10.221.84.65 port 2414

debug1: Client protocol version 2.0; client software version OpenSSH_5.1

debug1: match: OpenSSH_5.1 pat OpenSSH*

debug1: Enabling compatibility mode for protocol 2.0

debug1: Local version string SSH-2.0-OpenSSH_5.8p1 Debian-7ubuntu1

debug1: list_hostkey_types:

No supported key exchange algorithms

debug1: do_cleanup

debug1: do_cleanup

ssh -vvv on client

C:\Documents and Settings\clientuser>ssh -vvv -p 2222 [email protected]

OpenSSH_5.1p1, OpenSSL 0.9.8k 25 Mar 2009

debug2: ssh_connect: needpriv 0

debug1: Connecting to server.com port 2222.

debug1: Connection established.

debug1: identity file /cygdrive/c/Documents and Settings/clientuser/.ssh/identity type -1

debug3: Not a RSA1 key file /cygdrive/c/Documents and Settings/clientuser/.ssh/

id_rsa.

debug2: key_type_from_name: unknown key type '-----BEGIN'

debug3: key_read: missing keytype

debug3: key_read: missing whitespace

debug3: key_read: missing whitespace

debug3: key_read: missing whitespace

debug3: key_read: missing whitespace

debug3: key_read: missing whitespace

debug3: key_read: missing whitespace

debug3: key_read: missing whitespace

debug3: key_read: missing whitespace

debug3: key_read: missing whitespace

debug3: key_read: missing whitespace

debug3: key_read: missing whitespace

debug3: key_read: missing whitespace

debug3: key_read: missing whitespace

debug3: key_read: missing whitespace

debug3: key_read: missing whitespace

debug3: key_read: missing whitespace

debug3: key_read: missing whitespace

debug3: key_read: missing whitespace

debug3: key_read: missing whitespace

debug3: key_read: missing whitespace

debug3: key_read: missing whitespace

debug3: key_read: missing whitespace

debug3: key_read: missing whitespace

debug3: key_read: missing whitespace

debug3: key_read: missing whitespace

debug2: key_type_from_name: unknown key type '-----END'

debug3: key_read: missing keytype

debug1: identity file /cygdrive/c/Documents and Settings/clientuser/.ssh/id_rsa

type 1

debug1: identity file /cygdrive/c/Documents and Settings/clientuser/.ssh/id_dsa

type -1

debug1: Remote protocol version 2.0, remote software version OpenSSH_5.8p1 Debia

n-7ubuntu1

debug1: match: OpenSSH_5.8p1 Debian-7ubuntu1 pat OpenSSH*

debug1: Enabling compatibility mode for protocol 2.0

debug1: Local version string SSH-2.0-OpenSSH_5.1

debug2: fd 3 setting O_NONBLOCK

debug1: SSH2_MSG_KEXINIT sent

Read from socket failed: Connection reset by peer

我核实,在authorized_keys中,的.ssh等主机的权限是正确的。我重新生成主机密钥以避开'无法加载主机密钥'并重新启动ssh服务,但问题依然存在。有什么可能是错误的建议?主机私钥无法加载,因为它们属于'root'用户。不允许将其权限更改为除模式600以外的任何其他权限。我被困在这一点..请帮助!欣赏它!

2012-11-12

tkota

+0

你的'root'提示是否真的'$'? –

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值