LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-18-2012, 08:23 AM   #1
veelck
LQ Newbie
 
Registered: Jan 2012
Posts: 2

Rep: Reputation: Disabled
Post SSH tunneling suggestions/technique


I know this thread is crazy old, but did you maybe figure out how to do it?
I was trying searching forum and google, but couldn't find answer for exactly the same problem.

so:

1. localhost -> 2. middle server (do tunnel here) -> 3. server (inside local net, accessible only from 2.nd server through ssh)

What I'd like to achieve is set it up, that I can connect with ssh directly from 1. to 3., so I can move some files with e.g. mc without copying them first to 2. serv and then to 3rd.

Best,
Damian
 
Old 01-19-2012, 01:01 AM   #2
eco
Member
 
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Rep: Reputation: 48
Hi,

I can do that using ssh without any problems. Read the ssh man pages.

in '~/.ssh/config' I have the following lines

Code:
Host server3
        HostName server3
        IdentityFile ~/.ssh/rsa_key
        ProxyCommand ssh -W %h:%p server2
So if you are on server1 and want to connect through server2 to put a file on server3, the above should do the job.

Code:
server1$ scp testfile server3:
I hope this helps.
 
1 members found this post helpful.
Old 01-19-2012, 02:52 AM   #3
veelck
LQ Newbie
 
Registered: Jan 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
This works like a charm.
I did not setup the RSA for server2 (yet), so now when connecting I get two passwords to type, but it's exactly what I needed.

Thanks for quick response.

Best regards,
Damian
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
About SSH Tunneling RedNeck-LQ Linux - General 3 07-25-2011 09:34 AM
Suggestions On a Free or Low Cost SSH Tunneling Service dv502 General 1 04-01-2010 01:42 PM
I want documentation on SSH enctyption technique ZAMO General 2 04-10-2007 01:30 PM
SSH tunneling X AzZuM Linux - Security 3 11-27-2004 01:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration