M310 - vagrant ssh infrastructure - Permission denied

Please help me with this -

C:\mongo_course\m310-vagrant-env>vagrant ssh infrastructure
vagrant@ Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

C:\mongo_course\m310-vagrant-env>vagrant ssh infrastructure
vagrant@ Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

Try to destroy and rebuild the machine using the following exact commands:

vagrant destroy infrastructure -f
vagrant up infrastructure

Share a screenshot of the bottom part of the second command.

Again the same msg -

sharing you the bottom part of vagrant up infrastructure,

infrastructure: Using /usr/lib/python2.7/site-packages
infrastructure: Processing dependencies for pip
infrastructure: Finished processing dependencies for pip
infrastructure: + pip -V
infrastructure: pip 19.3.1 from /usr/lib/python2.7/site-packages/pip (python 2.7)
infrastructure: + pip install python-ldap
infrastructure: DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
infrastructure: Collecting python-ldap
infrastructure: Downloading https://files.pythonhosted.org/packages/ea/93/596f875e003c770447f4b99267820a0c769dd2dc3ae3ed19afe460fcbad0/python-ldap-3.2.0.tar.gz (367kB)
infrastructure: Collecting pyasn1>=0.3.7
infrastructure: Downloading https://files.pythonhosted.org/packages/62/1e/a94a8d635fa3ce4cfc7f506003548d0a2447ae76fd5ca53932970fe3053f/pyasn1-0.4.8-py2.py3-none-any.whl (77kB)
infrastructure: Collecting pyasn1_modules>=0.1.5
infrastructure: Downloading https://files.pythonhosted.org/packages/95/de/214830a981892a3e286c3794f41ae67a4495df1108c3da8a9f62159b9a9d/pyasn1_modules-0.2.8-py2.py3-none-any.whl (155kB)
infrastructure: Building wheels for collected packages: python-ldap
infrastructure: Building wheel for python-ldap (setup.py): started
infrastructure: Building wheel for python-ldap (setup.py): finished with status ‘done’
infrastructure: Created wheel for python-ldap: filename=python_ldap-3.2.0-cp27-cp27mu-linux_x86_64.whl size=281216 sha256=0e031bd6d28ca78cb51dab6b030283d93c0ef59d822b94b30b2b69bff4f582cc
infrastructure: Stored in directory: /root/.cache/pip/wheels/48/dd/0b/a06d1baf6575ad4520fc1fcf5bd96b493cd89670fdf6ade224
infrastructure: Successfully built python-ldap
infrastructure: Installing collected packages: pyasn1, pyasn1-modules, python-ldap
infrastructure: Successfully installed pyasn1-0.4.8 pyasn1-modules-0.2.8 python-ldap-3.2.0
infrastructure: + rm get-pip.py
infrastructure: DONE
infrastructure: + echo DONE

C:\mongo_course\m310-vagrant-env>vagrant ssh infrastructure
vagrant@ Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

Please help.

Do you have admin rights on your machine? Login as the Admin and try again.

Also try running these commands:

vagrant destroy infrastructure -f
vagrant up infrastructure

And if the above doesn’t work, then share a screenshot of the vagrantfile. Something may have changed recently.

PS: Here’s the info re the vagrant environment variable.

1 Like


I’m getting the exact same error.
For me this error show up only after Window 10 update ran on my laptop.
I had tried destroying vagrant, I had tried uninstall and reinstall everything, nothing works.

For the database vagrant, I got a prompt for password and I was able to login to the database with a password “vagrant” and build Mongo instance in it.
But I couldn’t get into infrastructure at all and I missed a lab exercise that required infrastructure because of this :frowning:

Please help.

Thanks !



Can you pls tell me if you fixed this ssh permission error.
If yes, do you mind tell me how did you fix it ?

Thanks !

@tommongo, a setting of 0 worked for @Yook_20450, so try that also:

vagrant destroy infrastructure -f 
vagrant up infrastructure
1 Like