Solved

how to do a quick tunnel with ssh

Posted on 2011-02-16
2
436 Views
Last Modified: 2012-05-11
I have a jumpoff box and just want to scp files from a to c, not from a, to the jumpoff and then to c.  

Also I need to make suure the tunnel goes away when I leave.

0
Comment
Question by:TIMFOX123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Accepted Solution

by:
de2Zotjes earned 500 total points
ID: 34915402
If it doesn't matter to you to logon to host a first:
You can use netcat/nc to pipe/tunnel all the traffic you put to jumpoff from a  further onto c

on host a put this in .ssh/config:
Host c
  ProxyCommand /usr/bin/ssh -q -A -x jumpoff nc -w30 <address of c> 22

Open in new window

You need to make sure that the user executing this can logon to jumpoff (from a) without user intervention.

The proxycommand causes ssh to first issue the commands in there and connect stdin/stdout of the sshsession to stdin/stdout of the proxycommand.
The command here will setup a session to jumpoff and execute netcat on jumphost, connecting in and out to netcat.
Tis solution is somewhat expensive as the traffic is double encrypted on the first leg (a to jumpoff)
0
 

Author Closing Comment

by:TIMFOX123
ID: 34917195
great answer

thx
0

Featured Post

Tutorials alone can't teach real engineering

So we built better training tools.

-Hands-on Labs
-Instructor Mentoring
-Scenario-Based Tests
-Dedicated Cloud Servers

All at your fingertips. What are you waiting for?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
​Being a Managed Services Provider (MSP) has presented you  with challenges in the past— and by meeting those challenges you’ve reaped the rewards of success.  In 2014, challenges and rewards remain; but as the Internet and business environment evol…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question