ssh无法连接到服务器
使用ssh无法登陆服务器,服务器是我刚买的砖瓦工,无论怎么重装系统还是不行,我能确定输入密码都是正确的。
我用的 Mac terminal, 服务器系统是centos6
整个系统登录对话及debug如下所示:
JackdeMacBook-Pro:~ lgq$ sudo ssh -p 26106 lgq@176.122.138.37
Password:
lgq@176.122.138.37's password:
Permission denied, please try again.
lgq@176.122.138.37's password:
Permission denied, please try again.
lgq@176.122.138.37's password:
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
JackdeMacBook-Pro:~ lgq$ sudo ssh -v -p 26106 lgq@176.122.138.37
OpenSSH_7.4p1, LibreSSL 2.5.0
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to 176.122.138.37 [176.122.138.37] port 26106.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: key_load_public: No such file or directory
debug1: identity file /var/root/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /var/root/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /var/root/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /var/root/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /var/root/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /var/root/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /var/root/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /var/root/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH_5* compat 0x0c000000
debug1: Authenticating to 176.122.138.37:26106 as 'lgq'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: diffie-hellman-group-exchange-sha256
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: umac-64@openssh.com compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: umac-64@openssh.com compression: none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(2048<3072<8192) sent
debug1: got SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: got SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: ssh-rsa SHA256:4XNDeQacNpoE+/4lvFL0vxKU+/lLMnCBGQ6CrftH3C0
debug1: Host '[176.122.138.37]:26106' is known and matches the RSA host key.
debug1: Found key in /var/root/.ssh/known_hosts:1
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Trying private key: /var/root/.ssh/id_rsa
debug1: Trying private key: /var/root/.ssh/id_dsa
debug1: Trying private key: /var/root/.ssh/id_ecdsa
debug1: Trying private key: /var/root/.ssh/id_ed25519
debug1: Next authentication method: password
lgq@176.122.138.37's password:
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
Permission denied, please try again.
lgq@176.122.138.37's password:
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
Permission denied, please try again.
lgq@176.122.138.37's password:
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
JackdeMacBook-Pro:~ lgq$
最后再说一句,我能确定输入密码是正确的,但是老是出现不允许,不知道怎么回事,请各位帮忙看一下。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
ssh lgq@176.122.138.37 试一试
呃呃呃呃,没有root账户吗,我还没遇到过这种情况哎,有没有被坑啊?
之前我遇到过类似的问题
某些时候,在terminal下粘贴的时候会有一些类似
[A
[e
这样的字符被带进去,原因我也不知道不过你可以试试完全退出terminal重新打开再试试