Sunday, September 11, 2011

SSH Tunneling

You have a trouble when you got your localhost (your computer) has no route to XWindows public server (linux, unix base). Your computer only has route to one of computer in the network which has route to public server that you want.
Somebody that ever install Oracle via remote connection will find this problem.
Your local computer is “localhost”
Your server #1 is private IP “″
Your server #2 is public IP “”

Localhost —– Server #1 ——- Server #2
|______ XWindows Application _______|
|___________ No Route ______________|

How to get connection via SSH so you can remote your public server include the XWindows application ?
Here are the steps must be done :
SSH tunneling from to public IP
ssh root@ -p 2350
ssh -L 2211: root@ -p 2350
SSH tunneling from localhost to
ssh -L 2211: root@ -p 2350
SSH to via tunnel + forward X
ssh -X root@localhost -p 2211
For example on X environment :
xclock &
You will get “xclock” program from remote