SSH configuration - no password login

I am working on an user's account to be setup as no password login using ssh between two hosts. On same hosts my personal login is also setup for no password prompt login and works fine as expected. But when I am trying the same thing for this user's id, I fail to get the expected results. No matter what I do, I am always getting prompted for a password. I used ssh -v for debugging and found out that for this user, public key authentication method is not successful and it skips forward to keyboard interactive authentication method, which results in to a password prompt.

Both source and destination hosts are Solaris 5.10 workstations. I have already looked in to file permissions; they look exactly the same for both user ids.

Does anyone have any idea or seen this problem before?

Thanks!

Message was edited by:

kaush28

Message was edited by:

kaush28

[912 byte] By [kaush28a] at [2007-11-27 11:24:50]
# 1

You don't describe the steps you took to setup the public key authentication.

Do the following on the client:

ssh-keygen -t rsa

locate the .pub file created default to ~/.ssh/id_rsa.pub

Login to the user account on the server

copy the content of id_rsa.pub on client to ~/.ssh/authorized_keys2 on the server.

From the client test your ssh connection. If the user account is different on the server than the one you are logged into on the client you will need to specify the user name. e.g.

ssh user@server

Hopefully that will work.

Stuart_Flishera at 2007-7-29 16:00:44 > top of Java-index,General,Network Configurations...
# 2

I am using dsa key instead of rsa. All steps are similar (exactly) as you discribed. Do not know what is missiong. It works for my own id but it is not working for this users id.

The user names are same in both the systems.

kaush28a at 2007-7-29 16:00:44 > top of Java-index,General,Network Configurations...
# 3

Here is the debug output:

for userid1 from Host-ABC to Host-XYZ (Good case):

Host-ABC:/home/userid1% sshHost-XYZluserid1

Debug1:

Debug1:

Debug1: Next Authentication method: Public key

Debug1: Trying private key: /home/userid1/.ssh/id_rsa

Debug1: Trying private key: /home/userid1/.ssh/id_dsa

Debug1: read PEM private key done: type dsa

Debug1: Authentication succeeded (Public Key)

*****Warning: Authorized users only****

Host-XYZ:/home/userid1%

For userid2 from Host-ABC to Host-XYZ (Bad case):

Host-ABC:/home/userid2% ssh Host-XYZluserid2

Debug1:

Debug1:

Debug1: Next Authentication method: Public key

Debug1: Trying private key: /home/userid1/.ssh/id_rsa

Debug1: Trying public key: /home/userid1/.ssh/id_dsa

Debug1: Authentications that can continue: gssapi-keyex, gssapi-with-mic,publickey,password,keyboard-interactive.

Debug1: Net Authentication Method: Keyboard-interactive

Password:********

*****Warning: Authorized users only****

Host-XYZ:/home/userid2%

kaush28a at 2007-7-29 16:00:44 > top of Java-index,General,Network Configurations...
# 4

Make sure the permissions on the home directory and .ssh directory are correct. SSH will not try the key if the directories are too permissive. The key files should be fine if created from ssh-keygen by the user.

Cory.Sokera at 2007-7-29 16:00:44 > top of Java-index,General,Network Configurations...
# 5

Permissions are set exactly the same for both users (userid1 and userid2).

kaush28a at 2007-7-29 16:00:44 > top of Java-index,General,Network Configurations...
# 6

Seems like permission was the culprit afterall.

All permissions were the same except the ../ was 777 instead of 700. '

# cd .ssh

# chmod 700 ..

fixed the problem I think.

Thanks!

kaush28a at 2007-7-29 16:00:44 > top of Java-index,General,Network Configurations...