Thread: SSH - public key not working
i trying connect 1 laptop pc.
pc try connect is: ubuntu 9.10 64-bit
laptop connect is: ubuntu 9.10 32-bit
pc: /etc/ssh/sshd_config
i used on pc:code:# package generated configuration file # see sshd(8) manpage details # ports, ips , protocols listen port 3434 # use these options restrict interfaces/protocols sshd bind #listenaddress :: #listenaddress 0.0.0.0 protocol 2 # hostkeys protocol version 2 hostkey /etc/ssh/ssh_host_rsa_key hostkey /etc/ssh/ssh_host_dsa_key #privilege separation turned on security useprivilegeseparation yes # lifetime , size of ephemeral version 1 server key keyregenerationinterval 3600 serverkeybits 768 # logging syslogfacility auth loglevel info # authentication: logingracetime 120 permitrootlogin no strictmodes yes rsaauthentication yes pubkeyauthentication yes authorizedkeysfile /home/marcin/.ssh/authorized_keys # don't read user's ~/.rhosts , ~/.shosts files ignorerhosts yes # work need host keys in /etc/ssh_known_hosts rhostsrsaauthentication no # similar protocol version 2 hostbasedauthentication no # uncomment if don't trust ~/.ssh/known_hosts rhostsrsaauthentication #ignoreuserknownhosts yes # enable empty passwords, change yes (not recommended) permitemptypasswords yes # change yes enable challenge-response passwords (beware issues # pam modules , threads) challengeresponseauthentication no # change no disable tunnelled clear text passwords passwordauthentication no # kerberos options #kerberosauthentication no #kerberosgetafstoken no #kerberosorlocalpasswd yes #kerberosticketcleanup yes # gssapi options #gssapiauthentication no #gssapicleanupcredentials yes x11forwarding yes x11displayoffset 10 printmotd no printlastlog yes tcpkeepalive yes #uselogin no #maxstartups 10:30:60 #banner /etc/issue.net # allow client pass locale environment variables acceptenv lang lc_* subsystem sftp /usr/lib/openssh/sftp-server usepam nofile is: /home/marcin/.ssh/authorized_keyscode:cat id_rsa.pub >> authorized_keys
used following command connect:as result got following results:code:ssh -p 3434 marcin@192.168.1.66 -vvvcan please advise how can find out wrong?code:openssh_5.1p1 debian-6ubuntu2, openssl 0.9.8g 19 oct 2007 debug1: reading configuration data /etc/ssh/ssh_config debug1: applying options * debug2: ssh_connect: needpriv 0 debug1: connecting 192.168.1.66 [192.168.1.66] port 7642. debug1: connection established. debug1: identity file /home/marcin/.ssh/identity type -1 debug3: not rsa1 key file /home/marcin/.ssh/id_rsa. debug2: key_type_from_name: unknown key type '-----begin' debug3: key_read: missing keytype debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug2: key_type_from_name: unknown key type '-----end' debug3: key_read: missing keytype debug1: identity file /home/marcin/.ssh/id_rsa type 1 debug1: checking blacklist file /usr/share/ssh/blacklist.rsa-2048 debug1: checking blacklist file /etc/ssh/blacklist.rsa-2048 debug1: identity file /home/marcin/.ssh/id_dsa type -1 debug1: remote protocol version 2.0, remote software version openssh_5.1p1 debian-6ubuntu2 debug1: match: openssh_5.1p1 debian-6ubuntu2 pat openssh* debug1: enabling compatibility mode protocol 2.0 debug1: local version string ssh-2.0-openssh_5.1p1 debian-6ubuntu2 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,rijndael-cbc@lysator.liu.se,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,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib debug2: kex_parse_kexinit: none,zlib@openssh.com,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,rijndael-cbc@lysator.liu.se,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,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: none,zlib@openssh.com debug2: kex_parse_kexinit: none,zlib@openssh.com 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: 119/256 debug2: bits set: 493/1024 debug1: ssh2_msg_kex_dh_gex_init sent debug1: expecting ssh2_msg_kex_dh_gex_reply debug3: put_host_port: [192.168.1.66]:7642 debug3: put_host_port: [192.168.1.66]:7642 debug3: check_host_in_hostfile: filename /home/marcin/.ssh/known_hosts debug3: check_host_in_hostfile: filename /etc/ssh/ssh_known_hosts debug3: check_host_in_hostfile: filename /home/marcin/.ssh/known_hosts debug3: check_host_in_hostfile: filename /etc/ssh/ssh_known_hosts debug1: checking without port identifier debug3: check_host_in_hostfile: filename /home/marcin/.ssh/known_hosts debug3: check_host_in_hostfile: match line 2 debug1: host '192.168.1.66' known , matches rsa host key. debug1: found key in /home/marcin/.ssh/known_hosts:2 debug1: found matching key w/out port debug2: bits set: 516/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/marcin/.ssh/id_rsa (0x2b4fa60) debug2: key: /home/marcin/.ssh/identity ((nil)) debug2: key: /home/marcin/.ssh/id_dsa ((nil)) debug1: authentications can continue: publickey debug3: start over, passed different list publickey debug3: preferred gssapi-keyex,gssapi-with-mic,gssapi,publickey,keyboard-interactive,password debug3: authmethod_lookup publickey debug3: remaining preferred: keyboard-interactive,password debug3: authmethod_is_enabled publickey debug1: next authentication method: publickey debug1: offering public key: /home/marcin/.ssh/id_rsa debug3: send_pubkey_test debug2: sent publickey packet, wait reply debug1: authentications can continue: publickey debug1: trying private key: /home/marcin/.ssh/identity debug3: no such identity: /home/marcin/.ssh/identity debug1: trying private key: /home/marcin/.ssh/id_dsa debug3: no such identity: /home/marcin/.ssh/id_dsa debug2: did not send packet, disable method debug1: no more authentication methods try. permission denied (publickey).
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] SSH - public key not working
Ubuntu
Comments
Post a Comment