Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Secure-Shell
[Top] [All Lists]

First time SSH user having trouble with key pair - "No more authenticati

Subject: First time SSH user having trouble with key pair - "No more authentication methods to try"
Date: Tue, 20 Mar 2007 03:23:14 +0000
Hi,

I am using OpenSSH for Windows 3.8.1 and trying to connect to an SSH server using public key authentication. I generated my key pair on an Ubuntu box and sent my public key to the person running the server. They have installed it in authorized_keys. I know my passphrase for the private key (I have checked it by resetting it with ssh-keygen).

When I try to connect to the server and enter my passphrase, I get an error message "No more authentication methods to try."

The command I am running is:
ssh -v -i id_rsa myusername@theserver
The file id_rsa is in the same directory as ssh.exe and so is the public key id_rsa.pub. I have also placed copies in my home directory.


The output I get is:

OpenSSH_3.8.1p1, OpenSSL 0.9.7d 17 Mar 2004
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to theserver [***.***.***.***] port 22.
debug1: Connection established.
debug1: identity file myusername_rsa type 1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.2p1 Debian-5
debug1: match: OpenSSH_4.2p1 Debian-5 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.8.1p1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc 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 'theserver' is known and matches the RSA host key.
debug1: Found key in /home/myprofilename/.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_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: myusername_rsa
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
Permission denied (publickey).


I'd be grateful if anyone could tell me where I'm going wrong. I noticed that if I omit the username from the command-line i.e.
ssh -v -i id_rsa theserver
then I am never asked for it by the server.


I also don't have a static IP address - does this matter?


Thanks,

Shane

<Prev in Thread] Current Thread [Next in Thread>
  • First time SSH user having trouble with key pair - "No more authentication methods to try", Shane O'Connor <=