Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 11-28-2005, 07:46 PM   #1
LQ Newbie
Registered: Mar 2005
Location: Greece
Distribution: Mandriva 2005LE
Posts: 21

Rep: Reputation: 15
SSH - Problem with Public Key Authentication

After the ciphers problem , I face some problems in authenticating with the use of public key. I used ssh-keygen -t rsa to create my own rsa public and private keys. Then, I editted the value of PublicKeyAuthentication so as it becomes yes in ssh_config file. I also copied public key to server and added it to authorized_keys (cat >> authorized_keys).

But, for my dissapointment, ssh denies to accept my prays ... Could you help me ? Any propositions? I have searched all the Internet till now but I didnt find a positive solution.
Old 11-28-2005, 08:19 PM   #2
Silas #1
LQ Newbie
Registered: Nov 2005
Location: Springfield, Ohio.
Distribution: Red Hat
Posts: 1

Rep: Reputation: 0
Hello everyone, I'm new to the forum and I'm looking for some information about a security problem I found. Can anyone help me?
Old 11-28-2005, 08:26 PM   #3
LQ Newbie
Registered: Nov 2005
Location: China
Distribution: Redhat,SuSE.FreeBSD
Posts: 13

Rep: Reputation: 1
It might be the key format problem, try to vi the authorized_keys files and make it much more like the decent style...

I met these kinds of problems before...when I appended my putty-generated pub-key into the file....when I appended my Debian-generated pub0key into redhat....etc.

I'm not pretty sure, anyway you may try...
Old 11-28-2005, 10:44 PM   #4
LQ Newbie
Registered: Mar 2005
Location: Greece
Distribution: Mandriva 2005LE
Posts: 21

Original Poster
Rep: Reputation: 15
debug1: Next authentication method: publickey
debug1: Offering public key: thauma
debug3: send_pubkey_test
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
I still have problems... I generated a new pair of keys with the name thauma kai You can see above the log messages I get through ssh -vvv -i thauma username@server. Any propositions??
Old 11-28-2005, 10:55 PM   #5
Registered: May 2004
Location: Frisco, TX
Distribution: Debian Unstable
Posts: 73

Rep: Reputation: 15
What ssh protocol are you using 1 or 2?

I believe that the only key types allowed in ssh1 is rsa1 where as ssh2 allows rsa and dsa keys.

EDIT: nvm i read more of the man pages, rsa1 and rsa are the same thing. Ignore the man behind the curtain.

Last edited by Draygo; 11-28-2005 at 11:07 PM.
Old 11-28-2005, 11:27 PM   #6
LQ Newbie
Registered: Nov 2005
Posts: 21

Rep: Reputation: 0
You also need to copy the private key to your ~/.ssh directory and call it id_rsa, possibly the public key as well (although I can't quickly think of a reason why the public key would be needed there).
cp mykey ~/.ssh/id_rsa
cp ~/.ssh/


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 public key authentication teacup Linux - Networking 4 11-27-2011 11:27 PM
DISCUSSION: Public key authentication with ssh david_ross LinuxAnswers Discussion 31 02-02-2011 08:13 AM
ssh public key authentication problem flgal3 Linux - Software 21 02-06-2009 11:15 AM
ssh public key authentication to different remote home directory shawn_t Linux - Networking 2 03-20-2005 03:39 PM
SSH public/private key authentication with GnuPG keys? thinksincode Linux - Security 1 02-25-2005 02:33 PM > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:45 AM.

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