LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 07-06-2011, 05:13 AM   #1
simopal6
Member
 
Registered: Jun 2006
Location: Italy
Distribution: Slackware 13.1
Posts: 217

Rep: Reputation: 30
SSH skips public key authentication for a key, but works with another key


Hello everyone,
I have a little problem :-)

For years, I've been using SSH with public key authentication to connect to a remote server, and my private key is formatted like this:

Code:
-----BEGIN DSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,6EAFBBA66B440AE1

stuffstuffstuff
-----END DSA PRIVATE KEY-----
Now I need to create another key for another user on the same server, so I've run ssh-keygen and the output private key is something like

Code:
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED 
DEK-Info: AES-128-CBC,7B196CE88FF664EEC250AFD52F55319A

stuffstuffstuff
-----END RSA PRIVATE KEY-----
So basically the only difference is that the new one is RSA and uses a different encryption algorithm

Anyway, if I set my .ssh/config file to use the new key (or if I rename it to "id_rsa"), ssh just skips the step when it asks for the passphrase, and goes directly to password authentication. However, in the end, it says "Permission denied (publickey,password,keyboard-interactive)."

Another thing... While the working key's public part is like:

Code:
---- BEGIN SSH2 PUBLIC KEY ----
Subject: simopal6
Comment: "[2048-bit dsa, simopal6@simone-nb, Mon Jul 18 2005 20:10:27]"
stuffstuffstuff
---- END SSH2 PUBLIC KEY ----
the new one is

Code:
ssh-rsa stuffstuffstuff simopal6@simopal6-nb
Could this difference be important?

I've tried creating a new key which uses DSA, but I got the same result...

Does anyone know what the cause to this might be?

Thank you!
 
Old 07-06-2011, 08:33 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,598

Rep: Reputation: 516Reputation: 516Reputation: 516Reputation: 516Reputation: 516Reputation: 516
Quote:
Originally Posted by simopal6 View Post
the new one is

Code:
ssh-rsa stuffstuffstuff simopal6@simopal6-nb
That is how all RSA pubkeys look.



You need to enable verbose logging with ssh -vv and try again, reading the output for clues.

You could also look for clues in the server's authentication (secure) log, or stop SSHd on the server and rerun it in debug mode (man sshd) to get the server-side messages.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh public key authentication teacup Linux - Networking 4 11-27-2011 11:27 PM
Putty/SSH login failed when using RSA public key: 'Server refused our key' itsecx@gmail.com Linux - Server 10 10-04-2010 01:19 PM
Public key authentication with ssh elnacho12 Linux - Networking 3 12-18-2007 08:38 AM
Public Key Authentication with SSH edafe Ubuntu 1 08-26-2006 11:06 AM
Can't use public key authentication with SSH Noob69 Linux - General 5 01-06-2006 06:27 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration