I am trying to connect to git using PowerShell remotely (Windows).
I have created a PowerShell script on the target machine which runs correctly (if I use remote desktop to access the machine).
I am connecting to PowerShell using SSH using a public SSH key.
I am using Enter-PSSession -ComputerName servername to connect to the remote machine to save the need to use a remote desktop connection. This is also due to the fact that some users will need to run this script without direct access to the machine.
I have already cloned the repository on the remote machine which I performed directly on the remote machine.
When I run the same PowerShell script remotely I get the following message when trying to do a Pull:
Host key verification failed.:String
I am using roaming profiles so the key I generated on the server will be the same as stored in my user directory on both machines.
I am very new to using SSH keys and I assume this is a security feature.
Is anyone able to help resolve this one to get it working remotely. I do not need it to work on the remote machine directly if this would help.