In troubleshooting my other question, I've surmised that for some reason the default private key isn't being used.
On server, C:\Users\Administrator.ssh\config contains:
Host bitbucket.org
IdentityFile ~/.ssh/id_rsa.ppk
I'm using plink to manage ssh keys while logged in. Running git commands works just fine when I'm actually at the computer logged in as Administrator. Another example: plink -T git@bitbucket.org
works ok.
However when logged into the server via PuTTY, runing git commands fails, and so does plink -T git@bitbucket.org
. However when I specify the private key with plink: plink -T -i C:\Users\Administrator\id_rsa.ppk git@bitbucket.org
, it works.
The %userprofile% is correct when I log into PuTTY, my laptop's username and password are exactly the same. What's causing ssh to not pick up and use the ppk file specified in the config? My GIT_SSH session variable is also set to plink.exe both when logged in locally and when logged in via PuTTY. Adding to the frustration is that I can't specify the ppk file when issuing git commands.
UPDATE: As stated in a comment reply below, the main issue seems to be that pageant.exe isn't being used to send the key to the server that I'm trying to connect to. When logged in locally pageant initiates just fine but not when logged in via PuTTY. I've also read up on 'user agent forwarding' in PuTTY but that didn't seem to help. Maybe freeSSHd doesn't support it? If it did would that even make a difference?
UPDATE 2: Yeeeeaaaahhh...getting closer. I typed 'pageant' while logged into VNC viewer and it said 'pageant is already running'. So I said what the hell and typed it into the PuTTY console...nothing happened. So I figured it wasn't running and now is. So I then executed the plink -T -v git@bitbucket.org and lo-and-behold pageant was executed, but said it has 0 SSH keys installed. So this is the core issue. pageant is a user-session based app and it thinks the SSH user Administrator is not the same as local Administrator so it's not serving any keys. I also closed the PuTTY connection and noticed that the extra pageant process was still running. Bad news #1. Bad news #2 is that there's no limit to the number of pageant processes I can start from within PuTTY. What to do?
FINAL: Problem solved; see last edit of answer.