Why is ssh asking for password after offering public key

Why is ssh asking for password after offering public key

Post by Digital Fa » Sat, 10 Apr 2004 17:25:45


I have ssh setup on 2 boxes ( aix / linux ).

building a batchjob i have made a plaintext key.
I force the command in the authorized_keys file

running from aix -> linux
ssh -i ~/.ssh/batchkey user@remote works perfect

but from linux -> aix
it get the following

debug1: Authentications that can continue:
publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering public key: /home/noluser/.ssh/batchkey
debug1: Authentications that can continue:
publickey,password,keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue:
publickey,password,keyboard-interactive
debug1: Next authentication method: password

it is offering the publickey but still goes to asking the password.

Same debug on aix -> linux gives

debug1: Authentications that can continue:
publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering public key: /bunolleken/users/joeri/.ssh/batchkey
debug1: Remote: Forced command: date

??? why ???
 
 
 

Why is ssh asking for password after offering public key

Post by dtucke » Sat, 10 Apr 2004 17:50:41

In article < XXXX@XXXXX.COM >,


Which ssh software? (debug looks like OpenSSH). What version? Which
OS versions?

[snip]


http://www.yqcomputer.com/ #3.14
and failing that
http://www.yqcomputer.com/

--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.

 
 
 

Why is ssh asking for password after offering public key

Post by mojorisi » Sat, 10 Apr 2004 23:11:38


I am going to make the following assumptions: 1) you've set up a NULL
passphrase for the account, on both systems, and put the public key on
both systems (the 'batchkey' file); 2) you are doing the file copying
in a batch script for un-attended file copying.

If these assumptions are correct, then check the permissions of the
user's home directory on the Linux system. The group and world
permissions should only have read and execute. If you put a write
permission on either, SSH will prompt you for the password. Also, the
'.ssh' subdirectory should only have read, write, and execute
permmission for the owner permission. Permissions can make or break
you if all else is set up correctly, at least this is what I have
found with OpenSSH implementations.

One other thing I always do is force SSH version 2 connectivity (i.e.
in OpenSSH's 'sshd-config' file the line would be "protocol 2" instead
of "#protocol 2,1" [which is the default]).

MJ