I realized I was missing one command to setup tunnel. Following thing worked, finally.
1) @local:ssh -L 2222:xeon:22 kevin at fenom (logs-in to fenom)
2) @fenom: ssh -L 50130:localhost:50130 kevin at xeon
3) @local: ssh -p 2222 kevin at localhost
4) @local: ssh -L 50130:localhost:50130 kevin at fenom
Now I am able to access hadoop interface on my local laptop. :)
Thanks CPH! I will give your solution a try, hope that further reduces the hassle.
From: CP Hennessy <cp.hennessy at openapp.ie>
To: ilug at linux.ie
Sent: Friday, July 20, 2012 2:51 PM
Subject: Re: [ILUG] [Beginner] SSH Tunneling
You can do a "ask me two passwords to login to a machine" thing.
eg. in your .ssh/config file add
Hostname fenom.whatever or IP address
LocalForward xeon-ip-address:50130 localhost:50130
Hostname IP address or name as known by fenom
ProxyCommand ssh fenom nc %h 22
Now when you have the command :
$ ssh xeon
you shold be asked for the password for your fenom username, then the password
for your xeon user name. Obviously getting both of these right gives you a
shell prompt on xeon.
For bonus points I've also included the Control* stuff above which means that
while the first ssh is running, any subsequent ssh to xeon should only require
the xeon password and not the fenom one.
Note that I'm not 100% that the "LocalForward" line is listed for the right
host, so you may need to move it down to the "xeon" config.
On Fri 20 Jul 2012 and Kevin Harry wrote:
> Hello group,
>> I'm new to this group and linux. I'm seeking help to setup SSH tunnel to my
> university's server. The server setup is described below:
>> LOCAL: My local laptop at home - Window7 laptop with Cygwin installed. I
> have working bash shell. FENOM: This is the intranet server of my
> university which is accessible from any outside network/internet machine
> (e.g LOCAL). XEON: This is the main server or cluster where hadoop is
> installed. One can login to this server only via FENOM.
>> Henceforth, using above names instead of IP address.
> The Hadoop cluster interface is available
> at http://localhost:50130/jobtracker.jsp on XEON. I want this interface
> accessible on my LOCAL laptop with same URL.
> Create SSH tunnel to LOCAL->FENOM-> XEON.
>> Steps taken so far:
> 1. created password less login from LOCAL to FENOM and FENOM to XEON. But I
> can't ssh directly to XEON from LOCAL with this. (this is correct I guess,
> unless tunnel is setup) 2. On LOCAL: executed ssh -L
> 2222:xeon:22 kevin at fenom [Successful]
> Now I think I have to execute this command on my LOCAL laptop:
> ssh -L 50130:localhost:50130 kevin at fenom [Failed]
>> To be able to access hadoop interface
> (http://localhost:50130/jobtracker.jsp) on my LOCAL laptop. But this is not
>> Please help me on how to fix this. I think I am doing something wrong,
> kindly point out my mistake to setup the SSH tunnel successfully.
>> Thank you very much.
> Irish Linux Users' Group mailing list
> About this list : http://mail.linux.ie/mailman/listinfo/ilug> Who we are : http://www.linux.ie/> Where we are : http://www.linux.ie/map/--
Irish Linux Users' Group mailing list
About this list : http://mail.linux.ie/mailman/listinfo/ilug
Who we are : http://www.linux.ie/
Where we are : http://www.linux.ie/map/
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!