LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-05-2004, 04:59 PM   #1
nedian123
Member
 
Registered: Jun 2004
Location: PAKISTAN
Posts: 46

Rep: Reputation: 15
Regarding Passwordless SSH


Hi,
1. Is it necessary to have the UID 's of the users same for passwordless SSH.
2. passwordless ssh in Redhat linux 9 is achieved thru SSH v2, is it necessary.....

I m Completely blocked doing passwordless ssh, the method which i tried is given under kindly solve my problem otherwise the MPICH installation makes some problems plus i can't execute program on 2 or 3 or 4 nodes.......


METHOD FOR PASSWORDLESS SSH
Generate a key pair while logged in as the kuser user on the client computer using the ssh-keygen command:

ssh-keygen -b 1024 -f identity -P '' -t dsa

This ssh-keygen command creates a 1,024-bit (-b 1024) key pair called identity (-f identity) using the DSA algorithm (-t dsa). The private key is created with a null-passphrase (-P ''), which is important for automating the login process.

Next, transfer the public key to the server. You can do this through a variety of means. I'll use SCP:

scp identity.pub kuser@[ip.of.server]:~/identity-[ip.of.client].pub

This command transfers a file called identity.pub from the local client computer by logging in as kuser on the remote server, and creates a file called identity-[ip.of.client].pub on that remote host. I recommend using a naming convention such as identity-[ip.of.client].pub to prevent possibly overwriting any identity.pub file already on the server. For example, transferring the file from a client at 192.168.1.181 to a server located at 192.168.1.10 using SCP might look like:

scp identity.pub kuser@192.168.1.10:~/identity-192.168.1.181.pub

You're prompted for the password for the kuser user on the remote host, and the file is transferred.

With the public key transferred to the server, log in to the server as the kuser user using SSH. You may be asked if you'd like to continue connecting to the server since the authenticity can't be verified. This is normal behavior the first time you connect to the SSH server. It's wise to verify the key fingerprint you receive, but in reality people usually just type "yes" to continue connecting.

Once on the server, use the command mkdir .ssh to create a .ssh directory within kuser's home directory, if one doesn't already exist, and place the contents of the identity-[ip.of.client].pub into a file called .ssh/authorized_keys:

cat identity-[ip.of.client].pub >> .ssh/authorized_keys

This command copies the contents of the public key from the client into a special file on the server side. Some Linux implementations create the file with the proper permission; others don't, so it's a good idea to verify the permission of this file on the server. It should be u+r or u+rw at most. If necessary, change the permission of the authorized_keys file on the server:

chmod 400 .ssh/authorized_keys

Run ls -l in the .ssh directory to double-check the permissions for the authorized_keys file, then log out of the server.

Now it's time to test the implementation. As the kuser user on the client, enter the command ssh [hostname/ip of server]. You should be logged in automatically without being prompted for a password. Congratulations!


Kindy solve my problem...........
 
Old 08-05-2004, 05:07 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
1) No
2) You can use version 1 as well but version 2 would be better

Take a look at this LA:
http://www.linuxquestions.org/questi...ticle&artid=79
 
  


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
Can't get passwordless ssh working thorney Linux - Networking 3 11-27-2005 10:08 PM
Ssh passwordless : Urgent muneebs123 Linux - Security 23 06-21-2005 08:26 PM
Passwordless SSH problem? LQYY Linux - Software 5 06-09-2005 09:56 PM
Passwordless SSH access to LTSP Terminals MurrayL Linux - Networking 0 06-06-2005 05:10 AM
Passwordless SSH for Cluster nedian123 Linux - Networking 3 12-07-2004 10:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

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