cuviper/ssh-pageant

ssh-pageant freezes after echo pid step

Closed this issue · 3 comments

after a bad shutdown, ssh-pageant now freezes when starting up:

ssh-pageant.exe -dra /tmp/.ssh-agent
 SSH_AUTH_SOCK=/tmp/.ssh-agent; export SSH_AUTH_SOCK;
 SSH_PAGEANT_PID=3360; export SSH_PAGEANT_PID;
 echo ssh-pageant pid 3360;

Pageant is running. The file /tmp/.ssh-agent is getting created.
It would be great if I had some more debug output to work with...

The -d debug mode causes the program not to daemonize, so it will stay in the foreground with stderr still open to show warnings. If you set that SSH_AUTH_SOCK in a different shell, does the agent work?

I'll grant you there's not much debug output, just warnings when something bad happens, but the program is small enough that I'm usually fine just stepping through with gdb. In your case, I'd wager it's simply waiting for new connections.

I would entertain a patch to trace interesting events though. Perhaps a repeated -d could increase the debug level to enable this extra output.

holy wow, you nailed it! I removed the -d flag and it started up fine and is using the Pageant keys and everything. I'm a bit perplexed that I wasn't having this problem before, but maybe that environment variable hadn't ever not been set (I don't restart often...)

More debug probably wouldn't have fixed my mistake. I perhaps shouldn't have opened my big mouth about it.

Thanks for your help, and for creating this tool! It saves me 50 or so annoying keystrokes a day :-)

Ah, great! You probably had a long-running instance in the background, so your -r was able to just point to that and quit. Don't you ever reboot for security updates? ;)

BTW, please don't worry about having filed an issue that turned out not to be a bug. Sometimes you just can't tell until you dig in, and I'd rather be informed of possible bugs.