NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
ssh-agent on 32-bit NetBSD?
I've had this in my .profile on my amd64 and aarch64 systems for years:
sagent(){
[ -S "$SSH_AUTH_SOCK" ] || export SSH_AUTH_SOCK="$(<
~~/.ssh/ssh-agent.env)"
# if cached agent socket is invalid, start a new one
[ -S "$SSH_AUTH_SOCK" ] || {
eval "$(ssh-agent)"
ssh-add
echo "$SSH_AUTH_SOCK" > ~/.ssh/ssh-agent.env
}
}
sagent
It works fine on the console, under X11 & xdm, and ssh. Recently I've
resurrected some old 32-bit machines, an i386 (eeePC 900) and an armv7
(raspberrypi 2B), and on those machines I get an error:
ksh: /home/tsprad/.profile[50]: /home/tsprad/.ssh/ssh-agent.env: cannot
open $() input
I should mention I use /bin/ksh, have done for decades.
Sprinkling a few debug prints indicates that the construct:
echo " socket: " $SSH_AUTH_SOCK
[ -S "$SSH_AUTH_SOCK" ] || echo " sock1: " $SSH_AUTH_SOCK
is the problem. Both echoes show $SSH_AUTH_SOCK as blank. The test for
a socket works as expected on 64-bit but not on 32-bit.
Can anyone offer a clue?
--
Ted Spradley
I remember when bits were forged from rings of iron and bytes were
hand sewn like baseballs by women in Puerto Rico. Yes, I am very old.
Home |
Main Index |
Thread Index |
Old Index