How to exit SSH of vagrant in terminal
50,739
Solution 1
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
.
Solution 2
If you want to ssh to the machine you can do following:
vagrant ssh
or
homestead ssh
If you are in the machine you can run the command exit
to get out of it.
Related videos on Youtube
Author by
michaelsnowden
Updated on September 18, 2022Comments
-
michaelsnowden over 1 year
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 "127.0.0.1 example.example.com" >> /etc/hosts $ vagrant up $ fab vagrant:honza bootstrap # replace with your name $ vagrant ssh # OK, cool $ run # I'm trapped!
-
user3731622 about 8 yearsI'm using Cmder in windows 10,
exit
andCTRL+D
worked for me, butCTRL+C
didn't work. -
Austen over 4 yearsSame for me.
exit
seems to be the best answer here. -
nofinator over 3 yearsNote that
homestead ssh
is a common alias that's specific to the homestead Vagrant box for Laravel development. Onlyvagrant ssh
should work for this question.