2

Recently I had to get my hard drive replaced on my work machine and thus had to reconfigure everything. As a result I had to reinstall git bash. Before I was able to ssh fine into wpengine and now I cannot. I am able to connect via the regular windows terminal fine but when I try with git bash I am getting the "Permission denied (publickey)." error for the same exact command.

I have tried all the suggested options from wpengine and in the different questions related to this on other SE questions and nothing is working.

I am using a Windows machine on windows 10.

Here are the following things I have tried:

  • Regenerating the key and adding it to my user public keys again and
    then waiting 24 hours.

  • Adding the config details to the ssh_config file in C:\Program Files\Git\etc\ssh

  • Adding a config file to my /User/username/.ssh/ folder.

  • I have tried using the following link and adding the wpengine rsa file: https://gist.github.com/jherax/979d052ad5759845028e6742d4e2343b as well.

Any and all help would be appreciated. My guess is there is some kind of permissions issue going on the local machine?

Why would the request from git bash terminal to wpengine look different from windows command terminal?

torek
  • 448,244
  • 59
  • 642
  • 775
YOUGLE
  • 43
  • 4
  • Compare `echo %HOME%` in cmd and `echo $HOME` in bash. – phd Aug 08 '22 at 16:31
  • (1) Windows comes with an ssh implementation; Git-for-Windows comes with a *second* ssh implementation; the two store their configs (and keys) in different places, so be sure which one you're using. (2) git-bash isn't Git (I fixed your tags). – torek Aug 08 '22 at 17:34
  • Thank you both for helping point me in the right direction. Both your comments helped me out. – YOUGLE Aug 08 '22 at 20:21

2 Answers2

2

I did solve my issue. If it helps you please use it!

When I used the command to the ssh host with : ssh -v user@environment.wpengine.ssh.net info

I got back this among the debug errors:

debug1: Offering public key: /c/Users/USERNAME/.ssh/KEY_FILENAME RSA XXXXXXXXXXXXXXXXXXXXX explicit

debug1: send_pubkey_test: no mutual signature algorithm

debug1: No more authentication methods to try. user@environment.ssh.wpengine.net: Permission denied (publickey).

After finding this page: https://transang.me/ssh-handshake-is-rejected-with-no-mutual-signature-algorithm-error/

I was able to solve the issue by adding the line: PubkeyAcceptedAlgorithms +ssh-rsa to my ssh config file.

Honestly I am not even 10% certain on WHY this worked, however, it solved my problem.

YOUGLE
  • 43
  • 4
0

How To Connect with SSH In WPEngine

If you are having trouble connecting to SSH in WPEngine Following are the commands which I used:

  1. ssh-keygen -t rsa -b 4096 -f c:/users//.ssh/wpengine_rsa

  2. Add Fingerprint in WPEngine My Profile – SSH

  3. Add Config file Host *.ssh.wpengine.net IdentityFile ~/.ssh/wpengine_rsa IdentitiesOnly yes

  4. Connect with your wordpress website (windows command prompt) ssh environment@environment.ssh.wpengine.net