Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm having a tricky situation. First I set-up a ssh access through keys and I forgot password for "keys", and then I couldn't connect. I tried to login using another computer, and I thought I would login using username and password. But this is what I'm getting-

mylaptap@mylaptop870:~$ ssh -v -p XXXX XXX.XXX.XXX.XX
OpenSSH_5.3p1 Debian-3ubuntu3, OpenSSL 0.9.8k 25 Mar 2009
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to XXX.XXX.XXX.XX [XXX.XXX.XXX.XX] port XXXX.
debug1: Connection established.
debug1: identity file /home/mylaptap/.ssh/identity type -1
debug1: identity file /home/mylaptap/.ssh/id_rsa type -1
debug1: identity file /home/mylaptap/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH_4*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3p1 Debian-3ubuntu3
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 '[XXX.XXX.XXX.XX]:XXXX' is known and matches the RSA host key.
debug1: Found key in /home/mylaptap/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-with-mic
debug1: Next authentication method: gssapi-with-mic
debug1: An invalid name was supplied
Cannot determine realm for numeric host address

debug1: An invalid name was supplied
Cannot determine realm for numeric host address

debug1: An invalid name was supplied

debug1: Next authentication method: publickey
debug1: Trying private key: /home/mylaptap/.ssh/identity
debug1: Trying private key: /home/mylaptap/.ssh/id_rsa
debug1: Trying private key: /home/mylaptap/.ssh/id_dsa
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-with-mic).

I was just wondering how could I disable using keys and login using "username" and "password" for ssh? Then I can clean everything...

share|improve this question
Thanks, everyone.. I resolved the issue with help of support people.. – user1260776 May 18 '12 at 12:50
up vote 7 down vote accepted

I don't think you can - you don't see password or keyboard-interactive in the 'Authentications that can continue' section. You'll need to connect via the console and sort it out. Your ssh Daemon is not allowing password authentication (i.e. not offering you the chance).

share|improve this answer
The problem was solved when password authentication was enabled.. – user1260776 May 18 '12 at 12:52

You have to get an other way to login to this machine (via console for example) and to set

PasswordAuthentication yes

in your sshd_config

share|improve this answer

Add -o PasswordAuthentication

ssh -v -p XXXX -o PasswordAuthentication XXX.XXX.XXX.XXX

If your server allows it, youll be able to use a password instead of key.

share|improve this answer
Doesn't this 'Authentications that can continue: publickey,gssapi-with-mic' imply the server isn't prepared to accept anything else? Rather than the client? – EightBitTony May 17 '12 at 13:29
Yes, downvote me more, i didnt read. – Sirch May 17 '12 at 13:48
You can vote to delete your own answers i think if you want to remove it. – EightBitTony May 17 '12 at 13:51
No need. IF your server allows it you can specify -o to pass options to bypass the key. -o has been very useful to me over the years. :) – Sirch May 17 '12 at 13:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.