Hi,
I would like to tunnel vnc with ssh. I have read lot of howtos, but still
have a problem someone may know the answer.
Basically, I don't want to keep a tty open with the ssh tunneling
session. Suppose my display number is $display and the name of
the server is $server. What I would do on the client is:
#start the vnc server
$ ssh $server vncserver :$display
# start the tunneling and go immediately in the backgroung with -f
$ ssh -f -L 50$display:$server:50$display $server a_command
# start vncviewer
$ vncviewer localhost:$display
To stop the session I would do something like
#kill the server
$ ssh $server vncserver -kill :$display
# stop the tunneling
$ ssh $server kill_command
with kill_command a command that kills a_command, to stop the tunneling.
I have tried for a_command
wait `cat ./vnc/$server:$display.pid`
but
$ ssh -f -L 50$display:$server:50$display $server wait `cat \
./vnc/$server:$display.pid`
returns immediately, with the error:
bash: wait: pid 5600 is not a child of this shell
Does someone knows a way to do what I want to, with specific a_command and
kill_command, or another way of doing it ?
Thanks in advance.
Pat
---------------------------------------------------------------------
To unsubscribe, send a message with the line: unsubscribe vnc-list
to [EMAIL PROTECTED]
See also: http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------