LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-03-2006, 01:38 PM   #1
eluzi
LQ Newbie
 
Registered: Apr 2005
Location: BRAZIL !!!
Distribution: Fedora4 :D
Posts: 17

Rep: Reputation: 0
SSH Rsa Auth fail...


Gentleman,

i've read all threads about it and none solved my problem...

Here's the issue, procedures and results:

2 Computers - ENRICO (pc1) and TEST (pc2)

AT ENRICO...
/home/enrico/.ssh/

ssh-keygen -t rsa
no passfrase

he creates id_rsa and id_rsa.pub

I chmod them to 700.

Then scp id_rsa.pub to TESTE (pc2)

Then at TEST (pc2)
/home/enrico/.ssh/

cat id_rsa.pub >> authorized_keys
chmod everyone to 700...

Chmod both .ssh/ folders with 700 also...

Then I went to /etc/ssh/sshd_config and the following are active in BOTH computers:

Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
SyslogFacility AUTHPRIV
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
RhostsRSAAuthentication yes
HostbasedAuthentication yes
IgnoreUserKnownHosts yes
PasswordAuthentication yes
ChallengeResponseAuthentication no
GSSAPIAuthentication yes
GSSAPICleanupCredentials yes
UsePAM no
X11Forwarding yes
Subsystem sftp /usr/libexec/openssh/sftp-server

--------------------------------------------

When I do from ENRICO (pc1) the command:

ssh -vvv enrico@TEST

he delivers the following debug:

OpenSSH_4.0p1, OpenSSL 0.9.7f 22 Mar 2005
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 10.0.171.174 [10.0.171.174] port 22.
debug1: Connection established.
debug1: identity file /home/d721425/.ssh/identity type -1
debug3: Not a RSA1 key file /home/d721425/.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
debug2: key_type_from_name: unknown key type '-----END'
debug3: key_read: missing keytype
debug1: identity file /home/d721425/.ssh/id_rsa type 1
debug1: identity file /home/d721425/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.0
debug1: match: OpenSSH_4.0 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.0
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: 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,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,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: none,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-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,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,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_init: found hmac-md5
debug1: kex: server->client aes128-cbc hmac-md5 none
debug2: mac_init: 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: 125/256
debug2: bits set: 506/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug3: check_host_in_hostfile: filename /home/d721425/.ssh/known_hosts
debug3: check_host_in_hostfile: match line 1
debug1: Host '10.0.171.174' is known and matches the RSA host key.
debug1: Found key in /home/d721425/.ssh/known_hosts:1
debug2: bits set: 526/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/d721425/.ssh/identity ((nil))
debug2: key: /home/d721425/.ssh/id_rsa (0x9d60848)
debug2: key: /home/d721425/.ssh/id_dsa ((nil))
debug1: Authentications that can continue: publickey,gssapi-with-mic,password,hostbased
debug3: start over, passed a different list publickey,gssapi-with-mic,password,hostbased
debug3: preferred gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup gssapi-with-mic
debug3: remaining preferred: publickey,keyboard-interactive,password
debug3: authmethod_is_enabled gssapi-with-mic
debug1: Next authentication method: gssapi-with-mic
debug1: An invalid name was supplied
Cannot determine realm for numeric host address

debug1: An invalid name was supplied
Cannot determine realm for numeric host address

debug2: we did not send a packet, disable method
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /home/d721425/.ssh/identity
debug3: no such identity: /home/d721425/.ssh/identity
debug1: Offering public key: /home/d721425/.ssh/id_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi-with-mic,password,hostbased
debug1: Trying private key: /home/d721425/.ssh/id_dsa
debug3: no such identity: /home/d721425/.ssh/id_dsa
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password




So, can anyone help me ? Thnx in advance
 
Old 03-03-2006, 02:28 PM   #2
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.2
Posts: 1,491

Rep: Reputation: 50
you probably need to use a pass phrase as this is not your host key...

did you follow me guide?
 
Old 03-06-2006, 07:22 AM   #3
eluzi
LQ Newbie
 
Registered: Apr 2005
Location: BRAZIL !!!
Distribution: Fedora4 :D
Posts: 17

Original Poster
Rep: Reputation: 0
Sorry but I didn't get what you mean... I used a blank passphrase as I wanted to tunnel trough ssh without needing to enter a password... Why would I want to enter one ? Thnx...
 
Old 03-06-2006, 08:38 AM   #4
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.2
Posts: 1,491

Rep: Reputation: 50
Quote:
debug3: Not a RSA1 key file /home/d721425/.ssh/id_rsa.
are you sure you are not using an RSA2 key to authenticate to an RSA 1 machine???
I think you need to check your /etc/ssh/ssh_conf and /etc/ssh/sshd_conf files on both/all machines (i.e all use protocol 2 only).



sorry, my mistake.....
 
Old 03-13-2006, 12:50 PM   #5
eluzi
LQ Newbie
 
Registered: Apr 2005
Location: BRAZIL !!!
Distribution: Fedora4 :D
Posts: 17

Original Poster
Rep: Reputation: 0
I'm using the same version on both and still can't get it to work...anyone has other suggestion of what could be going on here ???
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH RSA Auth lil_drummaboy Linux - Networking 2 11-27-2005 06:42 PM
Sendmail SMTP Auth fail for some users on vSite dimsh Linux - Networking 0 11-13-2005 03:09 PM
SSH: Can I force RSA auth for all but one account? LeoNot Linux - Security 1 07-10-2005 11:55 AM
RSA Keys for SSH XaViaR Linux - General 4 07-02-2005 09:15 AM
SSH, DSA and RSA Rex_chaos Linux - Networking 0 03-22-2002 05:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 04:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration