[PLUG] Invoking ssh-agent in Slackware

Robert Citek robert.citek at gmail.com
Sun Oct 30 18:48:35 UTC 2016


On Sun, Oct 30, 2016 at 11:31 AM, Rich Shepard <rshepard at appl-ecosys.com> wrote:
> On Sun, 30 Oct 2016, Rich Shepard wrote:
>
>> My inclination is to add a line to etc/rc.d/rc.local:
>
>    Oops! Re-reading man ssh-agent tells me it belongs in ~/.bash_profile

This is what I have near the top of my ~/.profile

[ -z "$SSH_AGENT_PID" ] && tty -s && exec ssh-agent bash --login

That tests for the SSH_AGENT_PID environment variable, which ssh-agent
creates.  If it exists, ssh-agent is already running.  It also tests
for an interactive terminal.  No need for an agent if the session is
non-interactive.

I then add RSA keys with this command:

$ ssh-add ~/.ssh/*_rsa

Adjust for other key types.

Good luck and let us know what works for you.

Regards,
- Robert



More information about the PLUG mailing list