2016-01-30 91 views
0

我想從Ubuntu機器做pi到ssh連接。我收到以下消息 命令:訪問被拒絕SSH服務器運行在樹莓派

ssh -vv PI_ipaddress -l pi 

屏幕輸出:

OpenSSH_4.7p1 Debian-8ubuntu1.2, OpenSSL 0.9.8g 19 Oct 2007 
debug1: Reading configuration data /etc/ssh/ssh_config 
debug1: Applying options for * 
debug2: ssh_connect: needpriv 0 
debug1: Connecting to 10.218.96.209 [10.218.96.209] port 22. 
debug1: Connection established. 
debug1: identity file /home/hadoop-user/.ssh/identity type -1 
debug2: key_type_from_name: unknown key type '-----BEGIN' 
debug2: key_type_from_name: unknown key type '-----END' 
debug1: identity file /home/hadoop-user/.ssh/id_rsa type 1 
debug2: key_type_from_name: unknown key type '-----BEGIN' 
debug2: key_type_from_name: unknown key type '-----END' 
debug1: identity file /home/hadoop-user/.ssh/id_dsa type 2 
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.0p1 Debian-4+deb7u2 
debug1: match: OpenSSH_6.0p1 Debian-4+deb7u2 pat OpenSSH* 
debug1: Enabling compatibility mode for protocol 2.0 
debug1: Local version string SSH-2.0-OpenSSH_4.7p1 Debian-8ubuntu1.2 
debug2: fd 3 setting O_NONBLOCK 
debug1: SSH2_MSG_KEXINIT sent 
debug1: SSH2_MSG_KEXINIT received 
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,[email protected],hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96 
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],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: 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: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256 
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,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,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected] 
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96 
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,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: found hmac-md5 
debug1: kex: server->client aes128-cbc hmac-md5 none 
debug2: mac_setup: found hmac-md5 
debug1: kex: client->server aes128-cbc hmac-md5 none 
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent 
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP 
debug2: dh_gen_key: priv key bits set: 141/256 
debug2: bits set: 509/1024 
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent 
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY 
debug1: Host '10.218.96.209' is known and matches the RSA host key. 
debug1: Found key in /home/hadoop-user/.ssh/known_hosts:16 
debug2: bits set: 525/1024 
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/hadoop-user/.ssh/identity ((nil)) 
debug2: key: /home/hadoop-user/.ssh/id_rsa (0xb7f1e598) 
debug2: key: /home/hadoop-user/.ssh/id_dsa (0xb7f1e5b0) 
debug1: Authentications that can continue: publickey,password 
debug1: Next authentication method: publickey 
debug1: Trying private key: /home/hadoop-user/.ssh/identity 
debug1: Offering public key: /home/hadoop-user/.ssh/id_rsa 
debug2: we sent a publickey packet, wait for reply 
debug1: Authentications that can continue: publickey,password 
debug1: Offering public key: /home/hadoop-user/.ssh/id_dsa 
debug2: we sent a publickey packet, wait for reply 
debug1: Authentications that can continue: publickey,password 
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,password 
Permission denied, please try again. 
[email protected]'s password: 
debug2: we sent a password packet, wait for reply 
debug1: Authentications that can continue: publickey,password 
Permission denied, please try again. 
[email protected]'s password: 

注:

  1. 如果我在PI使用ssh,它的工作原理。但是從其他系統,我無法訪問。
  2. 我輸入的密碼是正確的。那裏沒有問題。
  3. 我在pi中重新安裝了ssh,但它仍然不起作用。
  4. 我試圖從Windows機器(只是交叉檢查)禁用GSSAPI .Still沒有連接
  5. 我用Google搜索這個問題,我不能在解決方案
  6. 平從

任何系統的工作原理到達到pi。

任何幫助表示讚賞。

+0

我有兩個猜測它可能是什麼。 1是沒有爲ssh-server設置端口轉發。將路由器上的端口22重定向到樹莓派上的端口22。 2是給出的用戶名不正確。它似乎使用pi作爲用戶名登錄。你用什麼命令連接到pi中的ssh服務器? –

+0

1.你能否給我一些關於端口轉發的資源。我對此完全陌生。 2.「ssh -vv PI_ipaddress -l pi」我使用了所有系統中的相同命令。沒有改變 – Gaara

+0

我不確定您使用的IP地址是內部還是外部IP地址。如果從外部查看您的網絡,即使有多個設備,也只有1個IP地址。這就是爲什麼端口轉發是必要的,所以路由器知道發送傳入消息的設備。但是,如果你使用內部IP地址,你應該能夠連接到pi而不需要端口轉發。從這裏開始:http://portforward.com/english/applications/port_forwarding/SSH/default.htm從列表中選擇您的路由器,它會一步步顯示如何執行端口轉發。 –

回答

0

所以這個解決方案有點直觀。 Pi和Ubuntu系統之間的鍵盤佈局不一樣,因此在給出用戶未知的密碼時發出錯誤。