Afficher un message
Vieux 04/10/2006, 15h32   #2
Todd H.
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Creating dynamic tunnels using bash script (cygwin/solaris)

galmok@gmail.com writes:
> 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.


Why is that? What is it you're forwarding? Perhaps there's another
way to go about it.

> Does anyone out there have a suggestion/solution?


The easiest way of course would be

ssh solaris "command to figure out what port you want"
ssh -L5900:localhost:thatport solaris

If typing the password becomes a chore, switch to public key auth and
use ssh-agent first to load your key into memory. After that, ssh
commands to solaris would pop through without a password prompt which
is kinda fun.

Best Regards,
--
Todd H.
http://www.toddh.net/
  Réponse avec citation
 
Page generated in 0,06384 seconds with 9 queries