I have everything set up so that after I log in and add proper identity to ssh-agent using
ssh-add from a gnome-terminal window, I do not have to enter the passphrase again when I invoke
Now I wanted to make it even easier and create a panel launcher that would run
gnome-terminal --command "ssh myserver"
but while this does invoke what I want, it ignores ssh-agent, i.e. it asks for pass-phrase. And it does so every time, even if I supply the PP, the next time it asks again.
What am I doing wrong? Can anybody explain why this does not work?
gnome-terminal --command "ssh myserverfrom already open terminal works OK
ssh myserverpart to
bash -c "ssh myserver"with proper quoting did not help.
ssh myserverright in the launcher did not help: the pass-phrase prompt was displayed as a simple GUI window (unless I checked "Run in terminal" option, in which case the behavior was same as described above)
It's Ubuntu 12.04
adding -vvv to both ssh command, here is where the failing (and asking for PP) ssh starts to differ from the successful ssh:
[...] debug1: Server accepts key: pkalg ssh-rsa blen 279 debug2: input_userauth_pk_ok: fp 5e:ad:5e:1f:7f:... debug1: key_parse_private_pem: PEM_read_PrivateKey failed debug1: read PEM private key done: type <unknown> Enter passphrase for key '/home/lennycz/.ssh/id_rsa':
while the successful ssh says
[...] debug1: Server accepts key: pkalg ssh-rsa blen 279 debug2: input_userauth_pk_ok: fp 5e:ad:5e:1f:7f:... debug1: Authentication succeeded (publickey). [...]
(and then lot of things apparently unrelated...)
I haven't found any helpful debug messages around nor anything in system/auth logs.