Martin DiViaio on 4 Mar 2004 16:42:01 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Weird Bash Question




> Why do you want to do this, though? Binding to "0" gets you an
> unused socket which you then own, meaning there's no chance for a
> race condition between when you get the number and start using the
> socket.
> 
> What problem are you trying to solve?

I have a shell script that sets up a local ssh tunnel to another system 
like so:

ssh -2 -x -f -C -L 3389:windows_server_at_work:3389 martin@linux_box_at_work sleep 1

I then do:

rdesktop -g 1024x768 localhost

My problem is when I need to set up a second tunnel I can't use the shell 
script and have to do the commands manually pointing the local side to 
another port. I could make guesses in my shell script but I'm looking for 
a better solution.


___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug