Search code examples
sshvirtual-machinevirtualboxopenssh

No Shell after login message after SSH to VM


As the title says, I don't have shell on the VM after I ssh into it

enter image description here

The machine is on the Virtual Box with Port Forwarding on port 22 enabled. What's the reason of this? :/


Solution

  • Just call ssh without -T.

    From the man of ssh:

    -T Disable pseudo-terminal allocation.

    So, you won't have a shell if you call ssh -T.

    For example I executed it with -T:

    root@localhost:~# ssh test@localhost -p 1337 -T
    test@localhost's password:
    ^C
    

    and without -T:

    root@localhost:~# ssh test@localhost -p 1337   
    test@localhost's password:
    $