On 29/3/2026 20:27, Bob Proulx via Dng wrote:
> Lars Noodén via Dng wrote:
>> Tom via Dng wrote:
>>> Is it possible to have only one ssh-agent process running for my user
>>> account and access it from multiple logins?
>>
>> What problem are you trying to solve?
>>
>> If you are passing through one or more bastions/jumphosts then you should
>> probably use -J for ProxyJump instead.
>
> This is the best answer. Jump through the bastion host. Then you can
> use the ssh-agent on your desktop.
>
>> Is it possible to have only one ssh-agent process running for my user
>> account and access it from multiple logins?
>
> Answering this directly though is the "keychain" package. Install it.
> Then put this in your .bash_profile or .xsessionrc or the other
> appropriate environment file.
>
> keychain -q
> . $HOME/.keychain/$(hostname)-sh
>
> That will do all of the bookkeeping to start an ssh-agent if it is not
> running or to share an ssh-agent that is running.
>
> Hint: This also works to allow cronjobs to have access to a shared
> ssh-agent.
>
> Bob
Thanks Bob. I just read the description of the keychain package and it
looks like it does the same as the .bash_profile script that I posted
earlier.
Exactly what I was looking for.
Thanks,
Tom