"Unable to negotiate" with AWS CodeCommit: "no matching host key type found"

Viewed 3445
2 Answers

Nvm i found a solution i had to add this to my .ssh/config file

HostKeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa

if you getting this error after you added those two lines

Bad configuration option: \240\240pubkeyacceptedkeytypes

is because the spaces in the config file arent spaces their 240 characters

this helped me

Bad configuration option: \240\240user when setting up Amazon CodeCommit

what i did was copy the spaces that were on my other lines and used them in the new lines i added

For me, the problem was that windows was referring to the wrong root hard drive disk. (because pc managed by system administrators)

The solution was to create a new environment variable called HOME. With the directory of your .ssh folder.

  • press windows key
  • write edit environment

enter image description here

  • Click on the first new button

enter image description here

  • variable name = HOME
  • variable value = directory of your .ssh folder

enter image description here

  • press ok

  • press the other ok to save the changes.

  • Apply @Austin Grant answer afterwards if it doesn't work.

Related