I'm using Porteus 3.2.2 to connect to a VNC server in the internet through a SSH tunnel, and I'm trying to automate it as much as possible.
I have this script that creates the tunnel and keeps it open, but I would like to tweak it a little bit.
#!/bin/bash
#create SSH tunnel
ssh -L 5901:192.168.1.200:5901 -t [email protected] 'vncserver -geometry 1280x800; /bin/bash'
#open vncviewer
vncviewer -fullscreen localhost:5901
exit 0
I would like it to minimize the terminal window after logging in to the server.
Also AFTER login successfully, I would like it to open vncviewer with no terminal window, and with the options above.
The way I have the script doesn't work because it only launches after the ssh tunnel closes. And I can't use '&' to send the ssh tunnel to background. Also, if I put vncviewer before the SSH tunnel and send it to background I can't use the options...
Any help here?
Thanks in advance
permission denied
or what?