How can I start a shell inside a jail on FreeBSD?

22,264

First run jls to find out needed jail ID, then jexec ${jailID} /bin/tcsh (${jailID} is an ID of your jail)

Share:
22,264

Related videos on Youtube

Redconnection
Author by

Redconnection

Updated on September 17, 2022

Comments

  • Redconnection
    Redconnection over 1 year

    I have access to a a previously set up FreeBSD box with a number of jails on it. One of the jails is an SQL server, and does not have ssh enabled on it.

    How can I gain access to a shell on that jail from the host machine? (I have root rights on it.)

  • Philip
    Philip over 13 years
    +1 You might add that jails don't have shells (though you can start one in the same jail as another application), they aren't OS virtualization, they are application/userland virtualization. The jails all share the same kernel. More in the handbook.
  • gelraen
    gelraen over 13 years
    Even more, jail is essentially just resource isolation, not virtualization. There is another project more close to virtualization: 7he.at/freebsd/vps