i'm trying to make ssh work wit pp keys. However after have followed several howto's, I still have issues with the login. Server is opensuse 12.1, client is mac. This is the verbose output:
debug1: Reading configuration data /etc/ssh_config
debug1: Applying options for *
debug1: Connecting to 192.168.1.139 [192.168.1.139] port 22.
debug1: Connection established.
debug1: identity file /Users/me/.ssh/id_rsa type 1
debug1: identity file /Users/me/.ssh/id_rsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.8
debug1: match: OpenSSH_5.8 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.6
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '192.168.1.139' is known and matches the RSA host key.
debug1: Found key in /Users/me/.ssh/known_hosts:7
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/me/.ssh/id_rsa
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: keyboard-interactive
Password:
Anyone an idea where to seek? thanks
It is not possible to debug this any further from the client side. The client is offering the key, its not being accepted, it must be a problem on the server side. The quickest way to figure out the reason, if it is feasible, is to start another sshd in debug mode, which will tell you exactly why the key is rejected. On the server side:
which will start a sshd in debug mode on port 2222 (a different port so that we do not disturb the server running on port 22).
Then on the client side:
You should see the reason you key is rejected in the terminal where you start sshd.
Often the problem is with permissions being too lax. The authorized_keys file and the entire directory ancestry must not be writable by anyone but the user. So if the authorized_keys file is in /home/username/.ssh/authorized_keys, then, for instance, /, /home, /home/username all must NOT be group writable.
It appears the keys are generated on the system other than the one you are trying to connect to. Generate the key on the system from which you are tying to connect to.
Are you connecting to VPN tunnel first and then to the server. If that is the case then also you will get same error because your are no more connecting from your machine to protected resources.