i have some Linux installed on by Laptop and use SSH with private key authentication to connect to a server. Recently, I installed Win10 with the bash developer extension on by desktop. Since I only have one user account on this server, and hence only on key, i simply moved by private key file into the respective directory of my windows bash.
However, whenever I open a new bash instance and try to connect to the server, the error message: 'Permission denied (publickey).' is returned. My current fix are the following steps: exec ssh-agent bash; ssh-add;
While I could obviously add this into .profile, I would be required to enter the passphrase whenever I open bash.
Does anyone has some suggestions how to fix this more properly, s.t. I only have to enter my passphrase whenever I connect to the server and that I do not have to reinitialize my ssh key in every bash session.