• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 446
  • Last Modified:

how to do a quick tunnel with ssh

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
TIMFOX123
Asked:
TIMFOX123
1 Solution
 
de2ZotjesCommented:
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
 
TIMFOX123Author Commented:
great answer

thx
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now