鍍金池/ 問答/Java  C  Linux  網(wǎng)絡(luò)安全/ ssh無法連接到服務(wù)器

ssh無法連接到服務(wù)器

使用ssh無法登陸服務(wù)器,服務(wù)器是我剛買的磚瓦工,無論怎么重裝系統(tǒng)還是不行,我能確定輸入密碼都是正確的。
我用的 Mac terminal, 服務(wù)器系統(tǒng)是centos6
整個(gè)系統(tǒng)登錄對(duì)話及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$ 

最后再說一句,我能確定輸入密碼是正確的,但是老是出現(xiàn)不允許,不知道怎么回事,請(qǐng)各位幫忙看一下。

回答
編輯回答
無標(biāo)題

ssh lgq@176.122.138.37 試一試

2017年4月15日 05:25
編輯回答
浪蕩不羈

之前我遇到過類似的問題

某些時(shí)候,在terminal下粘貼的時(shí)候會(huì)有一些類似[A [e 這樣的字符被帶進(jìn)去,原因我也不知道

不過你可以試試完全退出terminal重新打開再試試

2017年10月3日 14:39
編輯回答
胭脂淚

呃呃呃呃,沒有root賬戶嗎,我還沒遇到過這種情況哎,有沒有被坑?。?/p>

clipboard.png

2017年9月8日 03:24