Quote:
Originally Posted by michaelk
Please define what you mean by run same exact command from the Gnome desktop.
|
When I run the sftp command from a terminal window from the Gnome GUI, it uses the wrong public key.
When I ssh to the system using putty from my Windows system and run the exact same command as the same user, it uses the proper public key.
So, when I use putty from my system and connect via SSH, I can run the following command successfully:
sftp -v -o IdentityFile=/home/user/.ssh2/id_rsa user@host
With -v specified, I can watch the debug info and see that it uses the proper keys:
debug1: identity file /home/user/.ssh2/id_rsa type 1
debug1: Offering public key: /home/user/.ssh2/id_rsa
But, if I open a terminal window through Gnome on the system itself and run the exact same command as above, it offers a different public key:
debug1: identity file /home/user/.ssh2/id_rsa type 1 (it looks correct at this point)
debug1: Offering public key: user@systemname
It doesn't specify the full path of the public key, but as the remote host is rejecting the connection, it appears to be using the wrong key, most likely from the /home/user/.ssh folder. I've tried specifying the identity file as above, as well as creating a config file that points to the proper ssh key, and they both do the same thing. I can't figure out why this works when I run it from putty, and then fails when I run it from the desktop on the system. It makes no sense. What else could I be missing?