Re: route information

This is a discussion on Re: route information within the OpenSSH Development forums, part of the Networking and Network Related category; Richard Mitchell wrote: [...] > # echo "bouncehost: " $bouncehost > # echo "target : " $target > # echo "port : " $...


Go Back   Usenet Forums > Networking and Network Related > OpenSSH Development

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-21-2008
Darren Tucker
 
Posts: n/a
Default Re: route information

Richard Mitchell wrote:
[...]
> # echo "bouncehost: " $bouncehost
> # echo "target : " $target
> # echo "port : " $port


If you're going to do this then you would be better off with

echo "bouncehost: $bouncehost" >/dev/tty 2>/dev/null

so that the output goes to the controlling terminal (if you have one)
rather than stdout. This means that anything expecting the ssh
connection to be clean (eg scp, rsync) will still work.

> ssh $bouncehost nc -w 1 $target $port


I have a hack that adds "portforward from stdin/out" which is useful for
this kind of thing as it does not require netcat on the intermediate
host (eg "ssh -N -L stdio:$target:$port $bouncehost"). The syntax is
ugly but it works.

--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/li...enssh-unix-dev
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:04 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0