LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 10-08-2012, 09:16 AM   #1
ghaedi591
LQ Newbie
 
Registered: Nov 2011
Posts: 28

Rep: Reputation: Disabled
automatic login by public key is not working


i tried to create public key as follow:
server1$ssh-keygen -t dsa
server1$ scp ~/.ssh/id_dsa.pub oracle@server2:.ssh/authorized_keys

server2$chmod 600 ~/.ssh/authorized_keys

but automatic login by public key is not working as follow:
server1$ ssh -vvv server2
..
debug3: Not a RSA1 key file /home/oracle/.ssh/id_dsa.
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
debug2: key_type_from_name: unknown key type '-----END'
debug3: key_read: missing keytype
debug1: identity file /home/oracle/.ssh/id_dsa type 2
debug1: loaded 3 keys
..
what is wrong!
 
Old 10-08-2012, 01:55 PM   #2
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,510

Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446
your error is telling you what the problem is. you generated a dsa key and the login is expecting a rsa key. run your ssh-keygen again but this time do this:

Code:
ssh-keygen -t rsa -b 4096
this will generate a military grade rsa key.

then from your ~/.ssh/ directory you can use the following to get it to the second server:

Code:
ssh-copy-id -i id_rsa.pub ruser@rhost
then you should be able to ssh ruser@rhost without p/w prompt as long as both sides are configured properly.

Last edited by lleb; 10-08-2012 at 01:58 PM.
 
Old 10-09-2012, 12:39 AM   #3
arun5002
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 549
Blog Entries: 5

Rep: Reputation: Disabled
Hi,


Quote:
debug2: key_type_from_name: unknown key type '-----END'

Look after the below blog for configuration passwordless login between two server .

http://www.linuxquestions.org/questi...os-rhel-35029/

http://www.linuxquestions.org/questi...-keygen-35063/

Last edited by arun5002; 10-09-2012 at 12:41 AM.
 
  


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
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
[SOLVED] SSH login with public key issue ZAMO Linux - Security 3 07-02-2010 03:36 PM
automatic login by using ssh but with out creating public key siris Programming 2 04-12-2010 07:40 AM
SSH: Automated Login via public key not working kregec05 Linux - Server 11 08-19-2009 02:49 AM
ssh2 login with public key ONLY? Timon79 Linux - Software 1 01-12-2003 01:28 PM


All times are GMT -5. The time now is 02:59 AM.

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