1833866 Members
2342 Online
110063 Solutions
New Discussion

SSH publickey disabled

 
Ben Palmer
New Member

SSH publickey disabled

We have SSH 3.1.0 (build 8) setup on 2 HP-UX 11.0 boxes. I am able to ssh as a non-root user using publickey authentication from host1 to host 2, but not host2 to host1 (we need bi-directional). We have the same ssh configuration setup on both machines. The error received (in verbose mode):

debug: Ssh2AuthClient/sshauthc.c:315: Method 'publickey' disabled.

Any help would be greatly appreciated.

Ben Palmer
4 REPLIES 4
harry d brown jr
Honored Contributor

Re: SSH publickey disabled

Ben,

HP's DEPOT build can be found here:
http://www.software.hp.com/cgi-bin/swdepot_parser.cgi/cgi/displayProductInfo.pl?productNumber=T1471AA


You can, and I have gotten the 3.4+ here:

http://hpux.cs.utah.edu/hppd/hpux/Networking/Admin/openssh-3.4p1/

live free or die
harry
Live Free or Die
Andrew Cowan
Honored Contributor

Re: SSH publickey disabled

This has nothing to do with the version you have! Start by comparing the "ssh_config" and "sshd_config" files on both systems, to ensure that they are both exactly the same (Obviously use the working system as the master).
Next restart the sshd daemon on the faulty machine and try again using "ssh -v ".

You also need to check that you have correctly copied the ".pub" file from your $HOME/.ssh directory to "authorized_keys" (or "authorized_keys2") on the remote system.

Finally check that the ownerships and permissions are correct on all the files (see the man pages).

Incidentally, you should always disable direct root login via SSH, and use "su" instead. This means that you still have the added protection of the second password, but it is encrypted so nobody can eavesdrop to get it.

Sebastien Masson
Valued Contributor

Re: SSH publickey disabled

Hi Ben,

1. Check permission of .ssh in root account of both machine. SSH is very paranoid and if you have, as example, group writable, it block the pubkey authentication.
2. Be sure you put the public key of each account in the authorize_key file of the other machine.
3. Try with -v and check. Add many -v as required for more verbose. Check in firsts line (environment setup).
Ben Palmer
New Member

Re: SSH publickey disabled

Thanks, that helped. I scratched everything and started over ensuring that ALL config files matched (using the working host as a template) and all file permissions were set correctly. Works fine now.

Thanks again...