Vagrant ssh (terminal freezes)

5,958

Solution 1

Problem was 2 virtual machines running in the same time. You can check if you have 2 machines running with vagrant global-status. That causes terminal when in ssh to freeze.

New Update:

If you still have problems install Ruby.

If you still experience the same thing, then reinstall virtual box, this happens when you install Virtualbox Kernel driver not installed (virtual box kernel) if you installed this reinstall virtual box and everything will be fine.

Or if you are lazy to read just execute this commands

Re-install virtualbox-dkms package first

sudo apt-get remove virtualbox-dkms
sudo apt-get install virtualbox-dkms

sudo modprobe vboxdrv
sudo modprobe vboxnetflt

After all this steps if you still have freeze when vagrant ssh do this: Enter in your vagrant folder and remove vagrant box with the following command

vagrant box remove ubuntu/trusty64

P.S Name of my vagrant box is ubuntu/trusty64 , yours can be different, to see the list of the boxes in your VM type following command

vagrant box list

Solution 2

For me, this problem seemed to occur due to one or a combination of:

  • Compression on the SSH session
  • An SSH tunnel running at the same time

Most likely the SSH tunnel - I was tunneling X to allow access to a web browser. I think this perhaps in combination with the compression was causing the session to lock up.

Share:
5,958

Related videos on Youtube

Vesko Vujovic
Author by

Vesko Vujovic

Updated on September 18, 2022

Comments

  • Vesko Vujovic
    Vesko Vujovic over 1 year

    I have virtual machine with vagrant and ansible, when i connect to virtual machine with vagrant ssh, the terminal always freezes if i don't type something, the terminal is freezed. I can't type anything, and like that all over again. Please help!

    I'm using Ubuntu 15.10.

  • Vesko Vujovic
    Vesko Vujovic about 8 years
    yes i do... I experienced that problem, install ruby
  • Vesko Vujovic
    Vesko Vujovic about 8 years
    let me know if this helps
  • shearn89
    shearn89 about 8 years
    Ruby is already installed. I've added an answer.