Can't access Unbuntu rig running xVNC.

Soldato
Joined
4 Jan 2004
Posts
20,802
Location
¯\_(ツ)_/¯
Ok, I'm access this machine fine, but then my rebooter crashes so I have to reboot it.

Now when I try to connect it tries, I type the password, but then the connection just dies.

Does anyone know how I can reboot this machine without having to drive 10 miles and reboot it physically? :(
 
That's actually pretty easy. First you make sure that you've got the necessary tools
sudo apt-get install smbfs smbclient

Then you make a directory in which you can mount it
sudo mkdir /media/sambaaaaaaaaaaaaaa

Lastly you mount it
sudo mount -t cifs //hostess/sharenameesses /media/sambaaaaaaaaaaaaaa -o iocharset=utf8,file_mode=0777,dir_mode=0777
Thanks, I got that to work in the end... Now to script it. :)
Orrrr you could configure SSH on your box, so you can just kill the current session manually / start a new vncserver.

So many options ;)
I may look into using SSH. It would have the added benefit of extra security also. :)
 
Why script it? It's only the one line that has to be passed after the tools are installed and the mount directory is made.

If you want it to be automatic add it to your fstab. It'd then mount at boot or every time you run
sudo mount -a
Actually that would probably be a better idea... I'm just making a script to back up a few files over the network but actually leaving the Samba share mounted should be easier and faster... I was originally planning to mount then unmount the share everytime the script is run.
Yup, and with SSH you have the ability to open any port you need into your lan whenever you need with ssh tunneling... so useful!

ssh -L5900:127.0.0.1:5900 [email protected]
(Putty client for windows can also do it under 'SSH Tunneling' menu)

Opening that SSH tunnel and then pointing your VNC client to 'localhost' so that it redirects down the tunnel would connect you to the VNC server through your ssh session.

useful stuff, and so widely unknown.
//TrX
That doesn't sound too difficult. I'm using a different port to 5900, say I'm using 4444 (for example), would this work? I'm connecting from a Windows XP client (tightvnc)...

In putty:
ssh -L4444:127.0.0.1:4444 123.123.123.123

Then in tight VNC I access it with this:
localhost::4444

Now I'm guessing I need to enable some sort of SSH service on the Unbuntu rig, I won't be able to access it physically until next week, so I'll have a go at setting it up then. :) Hopefully you'll be unsuspended by then also... ;) :p
 
Back
Top Bottom