ubuntu – 为什么RSA SSH身份验证仅在控制台登录后才能运行?

前端之家收集整理的这篇文章主要介绍了ubuntu – 为什么RSA SSH身份验证仅在控制台登录后才能运行?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在我的一个ubuntu服务器上设置了RSA身份验证,但是每次重启后,我都无法通过ssh RSA登录.为了使用ssh登录,我需要先通过控制台登录,然后RSA开始工作.为什么???

下面是我的sshd配置文件以及控制台登录之前和之后ssh -vv命令的输出. .

在控制台登录之前:

debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /Users/smorhaim/.ssh/smorhaim (0x7ff8d8c242c0)
debug2: key: /Users/smorhaim/.ssh/id_rsaadmin (0x7ff8d8c24cf0)
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/smorhaim/.ssh/smorhaim
debug2: we sent a publickey packet,wait for reply
debug1: Authentications that can continue: publickey
debug1: Offering RSA public key: /Users/smorhaim/.ssh/id_rsaadmin
debug2: we sent a publickey packet,wait for reply
debug1: Authentications that can continue: publickey
debug2: we did not send a packet,disable method
debug1: No more authentication methods to try.
Permission denied (publickey).

控制台登录后:

debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /Users/smorhaim/.ssh/smorhaim (0x7f91c14242c0)
debug2: key: /Users/smorhaim/.ssh/id_rsaadmin (0x7f91c1424ae0)
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/smorhaim/.ssh/smorhaim
debug2: we sent a publickey packet,wait for reply
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug2: input_userauth_pk_ok: fp b1:d5:90:43:be:43:52:a9:7f:05:c7:04:86:57:b3:ff
debug1: Authentication succeeded (publickey).
Authenticated to 10.10.30.151 ([10.10.30.151]:22).

sshd配置:

Port 22
Protocol 2
ListenAddress 10.10.30.151

UsePrivilegeSeparation yes
SyslogFacility AUTHPRIV
PermitRootLogin no
PasswordAuthentication no
ChallengeResponseAuthentication no
UsePAM yes
X11Forwarding yes
我刚遇到同样的问题;原来我的主目录是加密的.有趣的是,我不记得选择它是加密的选项,它似乎只是在最近的升级后开始发生(ubuntu 10.04.4服务器)
原文链接:https://www.f2er.com/ubuntu/348263.html

猜你在找的Ubuntu相关文章