2016-05-31 62 views
-2

我面臨着SSH(DSA)登錄的問題,這裏的情景:SSH登錄問題有兩個不同的用戶名

  1. 在我主我創建SSH密鑰對用戶dx和設置權限的.ssh和和id_dsa的id_dsa.pub
  2. 我把公鑰到 遠程提供的 ,他安裝在用戶CMC的主目錄 公鑰和他設置權限的.ssh和authorized_keys的 文件

當我嘗試ssh進入機器時,我被要求輸入密碼; telnet到主機工作正常。

這是我的命令:

ssh -i /home/dx/.ssh/id_dsa [email protected] -vv 

OpenSSH_6.6.1, OpenSSL 1.0.1k-fips 8 Jan 2015 
debug1: Reading configuration data /etc/ssh/ssh_config 
debug1: /etc/ssh/ssh_config line 56: Applying options for * 
debug2: ssh_connect: needpriv 0 
debug1: Connecting to 212.183.129.139 [212.183.129.139] port 22. 
debug1: Connection established. 
debug1: identity file /home/dx/.ssh/id_dsa type 2 
debug1: identity file /home/dx/.ssh/id_dsa-cert type -1 
debug1: Enabling compatibility mode for protocol 2.0 
debug1: Local version string SSH-2.0-OpenSSH_6.6.1 
debug1: Remote protocol version 1.99, remote software version OpenSSH_4.4 
debug1: match: OpenSSH_4.4 pat OpenSSH_4* compat 0x00000000 
debug2: fd 3 setting O_NONBLOCK 
debug1: SSH2_MSG_KEXINIT sent 
debug1: SSH2_MSG_KEXINIT received 
debug2: kex_parse_kexinit: [email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 
debug2: kex_parse_kexinit: [email protected],[email protected],ssh-rsa,[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,ssh-dss 
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,[email protected],[email protected],cha[email protected],aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected] 
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,[email protected],[email protected],[email protected],aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected] 
debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-md5,hmac-sha1,[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96 
debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-md5,hmac-sha1,[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96 
debug2: kex_parse_kexinit: none,[email protected],zlib 
debug2: kex_parse_kexinit: none,[email protected],zlib 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: reserved 0 
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss 
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr 
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr 
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96 
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96 
debug2: kex_parse_kexinit: none,[email protected] 
debug2: kex_parse_kexinit: none,[email protected] 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: reserved 0 
debug2: mac_setup: setup hmac-md5 
debug1: kex: server->client aes128-ctr hmac-md5 none 
debug2: mac_setup: setup hmac-md5 
debug1: kex: client->server aes128-ctr hmac-md5 none 
debug1: kex: diffie-hellman-group-exchange-sha256 need=16 dh_need=16 
debug1: kex: diffie-hellman-group-exchange-sha256 need=16 dh_need=16 
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<3072<8192) sent 
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP 
debug2: bits set: 1564/3072 
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent 
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY 
debug1: Server host key: RSA c4:36:f5:6f:b6:e3:49:88:f7:d1:5b:2a:0b:57:8f:ef 
debug1: Host '212.183.129.139' is known and matches the RSA host key. 
debug1: Found key in /home/dx/.ssh/known_hosts:1 
debug2: bits set: 1530/3072 
debug1: ssh_rsa_verify: signature correct 
debug2: kex_derive_keys 
debug2: set_newkeys: mode 1 
debug1: SSH2_MSG_NEWKEYS sent 
debug1: expecting SSH2_MSG_NEWKEYS 
debug2: set_newkeys: mode 0 
debug1: SSH2_MSG_NEWKEYS received 
debug1: SSH2_MSG_SERVICE_REQUEST sent 
debug2: service_accept: ssh-userauth 
debug1: SSH2_MSG_SERVICE_ACCEPT received 
debug2: key: /home/dx/.ssh/id_dsa (0x55d28676a9a0), explicit 

Unauthorised use is an offence pursuant 
to the Computer Misuse Act 1990 

debug1: Authentications that can continue: publickey,password,keyboard-interactive 
debug1: Next authentication method: publickey 
debug1: Offering DSA public key: /home/dx/.ssh/id_dsa 
debug2: we sent a publickey packet, wait for reply 
debug1: Authentications that can continue: publickey,password,keyboard-interactive 
debug2: we did not send a packet, disable method 
debug1: Next authentication method: keyboard-interactive 
debug2: userauth_kbdint 
debug2: we sent a keyboard-interactive packet, wait for reply 
debug1: Authentications that can continue: publickey,password,keyboard-interactive 
debug2: we did not send a packet, disable method 
debug1: Next authentication method: password 

凡問題可能是什麼?可能是2個不同的用戶名?

謝謝!

+0

Stackoverflow是爲軟件開發提供幫助。這個問題更適合於[su]或[unix.se],我在[你幾天前問過](http://unix.stackexchange.com/q/285911/41659)。 – Kenster

+0

@Kenster是的,但我沒有得到任何反饋 – AlessioG

回答

0

如果遠程提供程序複製了您發送到適當位置的密鑰,它應該正常工作。

如果你可以ssh使用密碼爲用戶CMC,將已經使用創建的關鍵: ssh-copy-id -i /home/dx/.ssh/id_dsa.pub [email protected]

供應密碼CMC。之後,你將能夠運行你的命令ssh -i /home/dx/.ssh/id_dsa [email protected]沒有問題。

相關問題