If you run ssh with the -v switch, you will get more details on exactly what it is thinking when trying to connect to a server. For example, if it is skipping your public key because of permissions, it would tell you in the verbose messages.
For example
ssh -v chadl@void
will show a bunch of information on how the protocol is progressing. If the key is being accepted, you see something like (there is a ton more output, this is just a sampling):
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /home/chadl/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: Authentication succeeded (publickey).
In this case, the first line indicates that the client has a key to offer, and the server will (only) accept public keys for authentication. The method is selected, key is offered, and authentication finishes.
You will most likely see an error about why it is not using a public key (you did generate one, right?). Or, perhaps the issue is as simple as a mis-spelled or mis-permissioned ~/.ssh/authorized_keys file, so the server is not accepting the key, because it is not in there. In that case, the place to check is /var/log/secure on the server, and perhaps /var/log/messages.
Last edited by chadl; 04-18-2009 at 11:17 PM.
|