Solved

how to do a quick tunnel with ssh

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
OpenLDAP set password to expire 7 691
linux, squid server 23 59
Encrypted Laptop running Linux 3 127
Linux Ubuntu - Gave up waiting for root device. ALERT! /dev/sda1 does not exist 16 192
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…
BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (https://kb.isc.org/article/AA-01272), affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

791 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