Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vagrant ssh prompts 'no kex alg' and I'm unable to connect to the virtual machine

I'm trying to connect to a vagrant with a command vagrant ssh as instructed in the official vagrant documentation. Earlier I used older ubuntu as a virtual machine: config.vm.box = "hashicorp/precise32". During that time, issuing a command vagrant ssh did let me connect to the machine with just a username and password.

Now I changed the vagrant box to a newer one because I wanted newer nodejs. Currently, the box is: config.vm.box = "ubuntu/vivid32". Now with this box, if I run the vagrant, and try to connect to the machine with vagrant ssh, it does not let me, but instead it will prompt no kex alg. I read somewhere it has to do with authentication using keys. How could I connect to the new ubuntu with vagrant ssh? One option could be to just regularly connect to the box.

like image 977
Ville Miekk-oja Avatar asked Dec 10 '22 20:12

Ville Miekk-oja


1 Answers

I just had this same issue for a couple days a finally found a way to fix this. I know its a old topic but just incase other people will experiance the same issue. this is how you can solve it:

edit your sshd_config and add:

KexAlgorithms diffie-hellman-group1-sha1

this is what fixed it for me (obviously restart ssh after that)

like image 175
lauw Avatar answered Dec 13 '22 09:12

lauw