Permission denied when connecting to infrastructure


when trying to connect to the infrastructure machine I get the following error:

PS D:\MongoUniversity\M310\m310-vagrant-env> vagrant ssh infrastructure
vagrant@ Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

I can connect to the database machine just fine (although it asks for a password. I use vagrant and connect).

I tried destroying the machines and recreate them with “vagrant up” but the issue persists.

Any ideas on what might be wrong?

Hi cmaragoulis,

Be sure that you’ve installed

vagrant plugin install vagrant-vbguest

Next I would probably try a different shell and see if that works - could be a compatibility issue between shell and vagrant

Also students from previous classes have resolved issue by removing OpenSSH from windows10 path - %SYSTEMROOT%\System32\OpenSSH. Check out this post

What version of Windows are you running?

You may also want to check out the following …

…the fix from this post that has help is to update/install WMF Windows Management Framework - which depending on you host will update powershell

hope that helps,


Somehow it looks like your SSH call is being sent to your localhost, host OS. How is that even possible? Windows doesn’t even have an SSH daemon :smiley: Maybe I’m reading this wrong.

AH! Today I learned something! While booting one of my own Vagrant VMs I noticed that the SSH daemon is in fact addressed through! Vagrant sets up a local port forward that listens on your host box and pushes it to the SSH of the VM. Heh, that’s kinda funny.

Do we have solution for this error ?? How to resolve this issue ?? Please let know.
Thanks in advance

@ Raj_nbk

As you can see, this is quite an old post and is marked solved. If you have a new question, or if you don’t see the desired answer here, please create a new post with your full problem description.

These posts from old iterations of the class are here to answer common questions that arise, but if they don’t, making a new post is the fastest and best way to get help.