I just reinstalled Linux on my laptop, and I'm trying to get SSH pubkey authentication working via X11 applications. Specifically, I'm trying to use baobab to display the usage of a remote filesystem, and I need to SSH in as root but root has no password, o I need to use an SSH key to authenticate.

In the terminal, if I ssh root@theserver I get right in with no password, but if I use Baobab or Nautilus to connect, it asks me for my password. How can I have it use my SSH key?

I'm using Gnome on Ubuntu 10.10 in case it matters. On my previous install this worked, and I don't know if I did something before to make it work. if so, I've forgotten what... In fact, my previous install would pop up an X11 dialog asking for my SSH private key password if I needed to unlock it. How do I make that happen again?

  • 1
    I don't know exactly what is going on in your case, but the program that appears to be misbehaving ssh-agent. – kasterma Dec 1 '10 at 22:44
  • Oh, wow, you're right, my ssh-agent has gone <defuct>! I'll log out and back in again... – Josh Dec 1 '10 at 22:46
  • I rebooted and now ssh-agent is not defunct, but still I can't get X11 apps to SSH in, even when I can from the terminal :-( – Josh Dec 1 '10 at 22:58
  • Run /bin/dash (note: dash, not bash) from the Run command dialog with the “run in terminal” box checked (not via a terminal menu entry). In the terminal, type export. This shows the environment variables that are defined in your X session. What variables are there whose name begins with SSH_ (i.e. the line reads export SSH_…=…; the list is in alphabetical order)? – Gilles Dec 2 '10 at 19:52
  • @Gilles: There's both SSH_AGENT_PID and SSH_AUTH_SOCK. The PID is correct and the socket file exists and is writable by me... – Josh Dec 2 '10 at 20:26

Sorry everyone, it was a bonehead error on my part. The authorized_keys2 file for root was incorrect. Once I re-copied that file to the server, it works as it should.

  • Mark this as the answer please. – OneOfOne Dec 2 '10 at 22:17
  • 1
    @OneOfOne: I intend to -- I have to wait 20 hours more. That's how the site works, it gives others a chance to answer. – Josh Dec 2 '10 at 23:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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