2

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

akira
  • 63,447
palani
  • 141

4 Answers4

1

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?

akira
  • 63,447
0

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...

sleske
  • 23,525
0

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

jfmessier
  • 2,810
0

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
rlduffy
  • 135