LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices

Reply
 
Search this Thread
Old 05-05-2010, 08:17 AM   #1
tuxianD
Member
 
Registered: Jul 2006
Location: MumbaI
Distribution: Fedora 14, Solaris 10
Posts: 55

Rep: Reputation: 15
Question Ssh-Keygen generation


Dear Friends,

I am trying to generate ssh-keys for automated authentication.

Steps I followed on server1 with user id user1
$ssh-keygen -t rsa
$scp ./ssh/id_rsa.pub server2:/export/home/user1/.ssh
$cat id_rsa.pub > authorized_keys

same step followed on server2 with same user id i.e.user1

btw user1 is ldap id.

Inspite of the process mentioned above is followed, it prompts password while doing ssh connection.

Kindly suggest where am I missing?
 
Old 05-05-2010, 09:14 AM   #2
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by tuxianD View Post
Dear Friends,

I am trying to generate ssh-keys for automated authentication.

Steps I followed on server1 with user id user1
$ssh-keygen -t rsa
$scp ./ssh/id_rsa.pub server2:/export/home/user1/.ssh
$cat id_rsa.pub > authorized_keys

same step followed on server2 with same user id i.e.user1

btw user1 is ldap id.

Inspite of the process mentioned above is followed, it prompts password while doing ssh connection.

Kindly suggest where am I missing?
check the logs. i suspect either the key or the users .ssh directory wherever it maybe has incorrect permissions.

Preferably this for .ssh directory drwx------ or 0700

and this for authorized_keys -rw------- or 0600

Last edited by centosboy; 05-05-2010 at 09:39 AM.
 
Old 05-05-2010, 03:45 PM   #3
Blinker_Fluid
Member
 
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 682

Rep: Reputation: 63
What directory are you in when you started all this? you need your private key in ~/.ssh/ also are some of these steps on the remote server?

Quote:
$ssh-keygen -t rsa
$scp ./ssh/id_rsa.pub server2:/export/home/user1/.ssh
$cat id_rsa.pub > authorized_keys
You should have just done
scp ~/.ssh/id_rsa.pub server2:/export/home/user1/.ssh/authorized_keys
 
  


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-keygen issue salimshahzad Linux - Newbie 1 03-07-2010 04:44 AM
ssh-agent, ssh-add and ssh-keygen AND CVS raylpc Linux - General 2 11-19-2008 03:50 AM
need help automating ssh-keygen linxq4u Linux - General 1 08-25-2007 12:13 PM
How to ssh-keygen? Baran Linux - Networking 5 04-26-2005 03:40 PM
sftp and ssh-keygen help please grayhost Linux - Newbie 2 06-26-2003 06:51 PM


All times are GMT -5. The time now is 11:05 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