Index | Thread | Search

From:
Stuart Henderson <stu@spacehopper.org>
Subject:
Re: Move the ssh-agent socket from /tmp to $HOME/.ssh/
To:
Jesper Wallin <jesper@ifconfig.se>
Cc:
tech@openbsd.org
Date:
Tue, 29 Apr 2025 15:49:45 +0100

Download raw body.

Thread
On 2025/04/29 16:31, Jesper Wallin wrote:
> 
> Though, another solution, *if* this is a problem at all that is, would
> be to use ssh-add with -c.  Then it doesn't matter where socket is
> located.  Though, if it's not a problem, my apologies for the noise. :-)

ssh-add -c is very useful for some situations and a total pain for
others (even on the same machine - though this can often be improved
by running ssh-add -c with some keys and plain ssh-add with others).

> Index: app/xenodm/config/Xsession.in
> ===================================================================
> RCS file: /cvs/xenocara/app/xenodm/config/Xsession.in,v
> diff -u -p -r1.2 Xsession.in
> --- app/xenodm/config/Xsession.in	1 Jul 2022 20:42:06 -0000	1.2
> +++ app/xenodm/config/Xsession.in	29 Apr 2025 14:30:27 -0000
> @@ -29,7 +29,7 @@ then
>  	do
>  		if [ -f "$HOME/.ssh/$k" ]; then
>  			eval `ssh-agent -s`
> -			ssh-add < /dev/null
> +			ssh-add -c < /dev/null
>  			break
>  		fi
>  	done

This in Xsession is a bit of a problem, the desired ssh-add command
is really down to user preferences so having to modify a system-wide
file to change it is a nuisance. It would be nice to have a way to
avoid running that ssh-add which is nicer than "name your keys
something other than id_rsa id_ecdsa id_ecdsa_sk id_ed25519
id_ed25519_sk id_dsa" ...