14

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.)

mpontillo
  • 924
  • 6
  • 23
Redconnection
  • 297
  • 1
  • 3
  • 6

1 Answers1

25

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

jlliagre
  • 8,691
  • 16
  • 36
gelraen
  • 2,311
  • 20
  • 19
  • 1
    +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](http://www.freebsd.org/doc/handbook/jails.html). – Chris S Jan 28 '11 at 04:10
  • 1
    Even more, jail is essentially just resource isolation, not virtualization. There is another project more close to virtualization: http://www.7he.at/freebsd/vps/ – gelraen Jan 28 '11 at 09:58