Re: Creating dynamic tunnels using bash script (cygwin/solaris)
- From: Chuck <skilover_nospam@xxxxxxxxxxxxxx>
- Date: Thu, 05 Oct 2006 16:50:13 GMT
I am trying to create a tunnel via ssh from cygwin to solaris. Normally
I would do something like this (cygwin is my windows box having cygwin
installed and solaris is a solaris based server):
cygwin$ ssh -L5900:localhost:5900 solaris
My problem is that the destination port is unknown at the time I create
the ssh call. Only once I have logged in on solaris can I determine the
destination port. So I was thinking why not use the "~" escape code to
create a tunnel on the fly. The ssh connection is created in a shell
and therefore not used interactively.
So I would do something like this:
(send_commands) | ssh -t -t solaris | (parse_output)
Two problems arise now:
1) Using "-t -t" to force tty allocation prevents anything sent to
stdout/stderr on solaris to be trasmitted to my cygwin box.
2) Sending the escape code "~C" somehow makes ssh grab keyboard input
even though it is placed after a pipe (|), i.e. stdin was supposed to
come from send_commands yet ssh managed to grab keyboard input. I was
quite surprised that this was possible and have still not solved that
Of course, both problems are a showstopper. I dont know why ssh stops
listening to stdin once an escape command is requested "~C" and I am
also at a loss as to why solaris refuses to send any tty output back
via the ssh connection.
Does anyone out there have a suggestion/solution?
Not sure I see what the problem here is or why it needs to be
complicated. I use ssh to forward VNC connections all the time. I just
forward port 590x to the remote server same port and connect the viewer
to the localhost port. It's that simple. The only other thing you may
need to do is enable the option on the server that allows connections
- Prev by Date: Re: using PubkeyAuthentication, still getting dictionary attacks!
- Next by Date: Re: using PubkeyAuthentication, still getting dictionary attacks!
- Previous by thread: Re: Creating dynamic tunnels using bash script (cygwin/solaris)
- Next by thread: Re: Creating dynamic tunnels using bash script (cygwin/solaris)