[NFBCS] Questions about ssh-agent and ssh-ad
Jim Barbour
jbar at barcore.com
Fri Feb 21 21:47:31 UTC 2025
Hey All,
ssh-agent works better than .ssh/config for keys with passphrases.
My suggestions are that you
* Don't use passphrases
* run ssh-agent inside a VM, so you never have to reboot it, just suspend it.
* there's a way to use the unix expect command to push passphrases into ssh-add, which removes having to type complicated phrases.
Hope this helps,
Jim
On Fri, Feb 21, 2025 at 09:11:58AM -0600, Lewis Wood via NFBCS wrote:
> I personally store my ssh keys in the .ssh folder, although you could store
> it any where (make sure it is chmode 600 where ever you store them.
>
> I edit the config file in the .ssh folder and add an alias perroute and
> login.
>
> For example:
> My PI Kubernetes Master is KM alias and my root is rkm.
>
> Thus I do: ssh km or ssh rkm or scp rkm:/etc/hosts .
>
> I even have one called github which logs into my id with my idententy file.
>
> My non root logins allow me to enter a password and my rkm on works with the
> identity file.
>
> I use linux/wsl , if you use windows you can do the same via your .ssh
> folder, I do not think it needs a chmod Windows is more lax.
>
> Lewis Wood
> lewislwood at gmail.com
>
>
> -----Original Message-----
> From: NFBCS <nfbcs-bounces at nfbnet.org> On Behalf Of Brian Buhrow via NFBCS
> Sent: Friday, February 21, 2025 8:21 AM
> To: nfbcs at nfbnet.org
> Cc: Brian Buhrow <buhrow at nfbcal.org>
> Subject: [NFBCS] Questions about ssh-agent and ssh-ad
>
> Hello. This is a question for those of you who make use of openssh
> and its various features.
> Recently, I've started using ssh-agent and ssh-add to add private keys to
> access my work environment. I run ssh-agent on my source machine and, when
> I log into that machine, ssh-agent is started. At this point I can add keys
> to ssh-agent's list of keys with the ssh-add command.
> All of that works fine and does exactly what I expect. However, when I log
> out, or if I reboot my source machine, ssh-agent terminates, to be started
> the next time I log into that machine. The problem is that all the keys I
> added to ssh-agent are now gone and I must re-add them with ssh-add.
>
> Is there a way to make keys stored with ssh-agent persistent across
> reboots and login sessions? I find it highly surprising that people
> consider using ssh-agent a time saver if they have to keep adding keys every
> time they restart ssh-agent for what ever reason. So, I must be missing
> something. Anyone here have ideas?
>
> -thanks
> -Brian
>
> _______________________________________________
> NFBCS mailing list
> NFBCS at nfbnet.org
> http://nfbnet.org/mailman/listinfo/nfbcs_nfbnet.org
> To unsubscribe, change your list options or get your account info for NFBCS:
> http://nfbnet.org/mailman/options/nfbcs_nfbnet.org/lewislwood%40gmail.com
>
>
> _______________________________________________
> NFBCS mailing list
> NFBCS at nfbnet.org
> http://nfbnet.org/mailman/listinfo/nfbcs_nfbnet.org
> To unsubscribe, change your list options or get your account info for NFBCS:
> http://nfbnet.org/mailman/options/nfbcs_nfbnet.org/jbar%40barcore.com
>
More information about the NFBCS
mailing list