Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SSH without being prompted for a password on AIX 1

Status
Not open for further replies.

strikelit

MIS
Sep 10, 2003
88
US
I am trying to setup ssh . I would like to ssh from one aix box to another without being prompted for a password. What can I do ? I copied the id_dsa_pub key from the main box to the authorized_keys file on the host I want to connect to and it doesnt work.
 
Have a look to your sshd_config file and look to those lines:

#RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys

Also have a look to your authorized_keys permissions group ant others shouldn't have write permissions.
 
strikelit,

I posted a reply to a simlier question a while back, below is my reply, hope it helps

###########################################################
It just happens that I have just finished a documentation for my company on ssh password. It may not be spot on what you need but it could be a good starting place.

#########################################################
There are two servers, Server1 and Server2. (this works between two AIX servers, two Linux server or between Linux and AIX servers)

Server1 & 2 want to be able to ssh from one server to another without asking for passwords.


On Server1 when logged in as the user you wish to use (this example we will use “user1” id)

Run the following command

#ssh-keygen –t rsa

You will get the following

Generating public/private rsa key pair.
Enter file in which to save the key (/home/user1/.ssh/id_rsa):

Press enter to take the default settings

Enter passphrase (empty for no passphrase):
Enter same passphrase again:

Press enter to blank out the password request for the “passphrase”

Your identification has been saved in /home/user1/.ssh/id_rsa.
Your public key has been saved in /home/user1/.ssh/id_rsa.pub.
The key fingerprint is:
blah:1b:42:ba:blah:ec:41:blah:01:blah:73:83:99998:8a:fb:99 user1@fileserver

So now you have created your rsa keys.
Now what you need to do is create a autorized_keys2 file on Server2, do this by doing the following, (make sure you are in the “/” directory before running)

scp /home/user1/.ssh/id_rsa.pub 1??.??.??.??:/home/sysadmtg/.ssh/authorized_keys2

You will get asked to enter in the password for the id you are using for Server2

user1@1??.??.??.??'s password:

After entering the correct password you should able to ssh or sftp to Server2 from Server1 without being asked for a password.

To be able to go from Server2 to Server1 in the same way and assuming you already have the two rsa file (if not just run the “ssh-keygen” command from the home directory) run the following command

scp /home/user1/.ssh/id_rsa.pub 1??.??.?.??.??:/home/user1/.ssh/authorized_keys2

You should be able to go between Server1 and Server2 without asking for passwords.
##########################################

Thanks.
 
And a search on google didn't supply any answers? Gee, I find multiple documents. Guess some people are just too lazy to look for themselves.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top