Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have my id_rsa.pub key under my /home/user/.ssh. I carefully copied that key and paste my key to respository Git account.

While trying to connect from my local system to my git respository, I got the following error:

warning: Authentication failed.
Disconnected; no more authentication methods available (No further 
authentication methods available.)

I removed SSH in system and re-enable and did again, but no luck. I have no idea what's happening with my SSH key. Can any one please tell me on this?

Note : I noticed in my home /home/user/.ssh && /home/user/.ssh2

share|improve this question

4 Answers 4

Hm, ssh on Ubuntu uses /home/user/.ssh for its configuration. Dunno where you got that .ssh2 from; the commercial SSH client from Tectia uses it, but you don't use that, do you? To be safe, move .ssh2 out of the way (rename it to .ssh2XXX, then rename it back when everything works).

To troubleshoot your problem, try connecting in debug mode:

ssh -vvv myuser@myhost 2>/tmp/ssh-debug-log

Then have a look at the logfile /tmp/ssh-debug-log to see what's wrong. If you can't figure it out, edit your question to include the logfile, then we'll see...

share|improve this answer
    
debug: SshConnection/sshconn.c:1937/ssh_conn_destroy: Destroying SshConn object. debug: Ssh2Client/sshclient.c:1446/ssh_client_destroy_finalize: Destroying client completed. debug: SshAuthMethodClient/sshauthmethodc.c:162/ssh_client_authentication_uninitialize: Destroying authentication method array. –  palani Jun 9 '10 at 11:29
    
Please put the log into your question, a comment is not appropriate (as I wrote...). –  sleske Jun 9 '10 at 13:41

read more about the whole public key thing 'here'. openssh wants the public-key in a file named ~/.ssh/authorized_keys. is that where you put it?

share|improve this answer
1  
@palani: since you answered my question in the other answer: then put the content of your id_rsa.pub file into the .ssh/authorized_keys file on the server. –  akira Jun 9 '10 at 13:31

I don't know how you generated your keys, but mines were generated using PuTTY under Windows so I can remotely access my Linux box from work, and I copied/pasted the content of the public key into the ~/.ssh/authorized_keys file, and here it goes. One thing I always notice: The key file is made of one single line of text, no hard return in the file. I also kind of remember that in previous keys, the main issue I had was that the public key I was pasting from generated file had hard returns in it, and joining all lines together usually solved my problems.

JF

share|improve this answer
    
i have don't have autorized_keys file on my location. instead of that i have ird_psa.pub key file –  palani Jun 9 '10 at 12:09
1  
HAve you tried copying/pasting the public key from the file to the authorized_keys files, or even just tried to copy the file under a new name ? That may solve your problem –  jfmessier Jun 10 '10 at 1:34

You might check the protections for the .ssh directory (should be 700) and the authorized_keys file (should be 644). Also, on the server, you can run sshd from the command line with the -d option to see some details of the authorization process, i.e.

sudo service sshd stop
/usr/sbin/sshd -d
share|improve this answer

Your Answer

 
discard

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.