在使用VPS(11.10 x86)进行实验期间,我遇到了远程访问我的计算机的问题。
安装系统后,我可以使用密码从Windows计算机(具有root特权的默认帐户)通过Putty登录。
在下一步中,我创建了新用户:
adduser gsa
之后,我尝试通过ssh登录:
ssh gsa@localhost
一切正常(因此密码正确)。
在尝试以gsa
用户身份(从Putty @ Windows)访问计算机时,我会收到Access denied
。
一些额外的信息:
ssh -vv [email protected]
.
.
debug2: we did not send a packet, disable method
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/id_rsa
debug1: Trying private key: /root/.ssh/id_dsa
debug1: Trying private key: /root/.ssh/id_ecdsa
debug2: we did not send a packet, disable method
debug1: Next authentication method: password
[email protected]'s password:
debug2: we sent a password packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
Permission denied, please try again.
在中/etc/ssh/sshd_config
,我放置了:
PasswordAuthentication yes
AllowUsers gsa
您有什么建议我该如何解决?
您是否为gsa用户设置了外壳?
您不需要在那里有AllowedUsers行,默认情况下,任何允许登录的人都应该也可以使用ssh(好吧,除了root之外)。
在ssh服务器上,“ getent passwd gsa”返回什么?
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句