Now, I'm not sure if this is specifically related to the current puppy I'm using (fossapup 9.5) but it seems that, when setting up ssh-agent and adding the password of a target private key, ssh *still* ask for that same password, as if ssh-agent wasn't running (which it is...).
I used different variation of the same commandline which I'm used to and usually worked on other distros:
Code: Select all
eval "$(ssh-agent)" ; ssh-add ~/.ssh/privatekey
or
Code: Select all
eval `ssh-agent` ; ssh-add ~/.ssh/privatekey
or
Code: Select all
eval `ssh-agent -s` ; ssh-add ~/.ssh/privatekey
The privatekey above is just an example. The one i have does have a password which is why i want to do this. Strangely enough, the only time ssh-agent seems to work and ssh does not ask for the previously mentioned password is when doing an ssh tunnel like so:
Code: Select all
ssh -f user@ip -i ~/.ssh/privatekey -L port:localhost:port
Without ssh-agent, the above command does ask for the password of the privatekey, as per usual.
Beside that, every other ssh command that could be used with the privatekey still ask for password even with ssh-agent running like shown above (except for the ssh tunnel command shown above)...
eg: The following
Code: Select all
ssh user@ip -i ~/.ssh/privatekey
Ask for the password even with ssh-agent.
The above set of command work normally on other distros i tried, so I'm unsure as to why this doesn't work as expected, especially given i didn't see any error coming from ssh, even with the verbose flag.
EDIT: Seems like there is indeed an error, when running
Code: Select all
ssh-add -l
The following is shown:
Code: Select all
Could not open a connection to your authentication agent.
So I'm guessing ssh-add somehow can't "hook" itself to the running ssh-agent? Seems like it (even though it work fine on other distro for some reason)
Also does not explain why the ssh tunnel command above work without asking for password, but other ssh command using the privatekey does...