Following the README in this repository, I am supposed to secure shell my way into a virtual machine I've created, but once I've done so, how do I get out?

Here are the instructions:

$ git clone git://github.com/honza/django-chef.git
$ cd django-chef
# add yourself to the "users" array in the Vagrantfile
$ sudo echo " example.example.com" >> /etc/hosts
$ vagrant up
$ fab vagrant:honza bootstrap  # replace with your name
$ vagrant ssh    # OK, cool
$ run            # I'm trapped! 

Assuming the run command stays running on the foreground, you can most probably end it with CTRL+C. Then the shell (and SSH) session can be terminated with exit or CTRL+D.

| improve this answer | |
  • 2
    I'm using Cmder in windows 10, exit and CTRL+D worked for me, but CTRL+C didn't work. – user3731622 Feb 25 '16 at 22:59
  • Same for me. exit seems to be the best answer here. – Austen Nov 12 '19 at 21:25

If you want to ssh to the machine you can do following:

vagrant ssh


homestead ssh

If you are in the machine you can run the command exit to get out of it.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.