2

My work computer runs Ubuntu 19.10 and has an ssh-agent setup for password-free connections to some other systems. It was rebooted and now the scripts that relied on not getting password prompts are hanging waiting for me to enter my key passphrase or password. I am logging in via ssh and having trouble finding a way to get ssh-agent to work from this angle.

Normally after a reboot I log in on-site and everything continues working as expected, presumably because using the graphical login activates this: /etc/X11/Xsession.d/90x11-common_ssh-agent. I can't source it directly and manually executing the command it runs also failed.

Running 'sudo xinit' in the background of my ssh session didn't work. I also tried 'eval ssh-agent (-s)` which had no effect.

Ideally I would like to get ssh-agent running globally in the background, not just in my current login session, so my nightly scripts can run even if I'm not logged in.

If I can't track this down eventually I'll have to compromise social-distancing and go to the office to log in directly. Thanks for any help.

1 Answer 1

0

Activating ssh-agent as if through the Xsession but remotely remains beyond my grasp but I think using this is a superior option: https://github.com/ccontavalli/ssh-ident/blob/master/ssh-ident

Swapping that in to wrap ssh causes it to handle all of the agent setup automatically and keep it set up persistently, I just need to enter my key once per reboot and it's off to the races.

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.