Solved

how to do a quick tunnel with ssh

Posted on 2011-02-16
2
423 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Hello EE, Today we will learn how to send all your network traffic through Tor which is useful to get around censorship and being tracked all together to a certain degree. This article assumes you will be using Linux, have a minimal knowledge of …
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

932 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now