2

I've just reinstalled Ubuntu 10.10 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, so 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 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?

Roman Riabenko
  • 2,145
  • 3
  • 15
  • 39
Josh
  • 8,311
  • 12
  • 54
  • 73
  • 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 01 '10 at 22:44
  • Oh, wow, you're right, my ssh-agent has gone ! I'll log out and back in again... – Josh Dec 01 '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 01 '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 'SO- stop being evil' Dec 02 '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 02 '10 at 20:26

1 Answers1

1

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.

Josh
  • 8,311
  • 12
  • 54
  • 73