# ssh into host machine through jail.



## billli (Oct 31, 2011)

Hi:

I was wondering if this is possible.

Suppose I have a machine with 2 ethernets both with a world accessible IP address. However, I also have 2 jails running, each with an ethernet in the jail.

For instance:
jail 1, eth0 has ip of 100.0.0.1
jail 2, eth0 has ip of 100.0.0.2

I can ssh into each of the jails from anywhere in the world without any problem. 

But is it possible to ssh into my host machine through the jail's IPs?

Thanks!


----------



## SirDice (Nov 1, 2011)

billli said:
			
		

> But is it possible to ssh into my host machine through the jail's IPs?


Yes, think of the jails as separate machines. Can you SSH from one machine to another?


----------



## billli (Nov 1, 2011)

SirDice said:
			
		

> Yes, think of the jails as separate machines. Can you SSH from one machine to another?



Much thanks, I figured a way to ssh to the jail then in the jail ssh to the host. Now I just have to tweak so that when i ssh with the jail's ip it will be forwarded to the host machine


----------

