VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: VNC over SSH  (Read 4515 times)

PaleFlyer

  • Member
  • *
  • Posts: 1
VNC over SSH
« on: July 04, 2011, 10:21:55 pm »

I am relativly new to Linux, and so far it has mostly been me playing with it.  But I am running a minecraft server from an older laptop, and am looking for a way to remote manage, I was using teamviewer, but my root password screwed up, so I needed to reinstall, and can't get teamviewer working again. I like vnc for the full interface, but I want the security of SSH. I know it is possible to get vnc over SSH, and I have vnc working. I am going with VL 6 standard gold as host, and an android phone as client.  I also want to be able to access my default desktop (0 I believe) as that is where the surver runs from. I know I could move it to the vnc window, but I still want to be able to use the full laptop experience, and the server is for more than just me. That is why I want the remote access.  Please let me know if more information is needed.
Logged

hata_ph

  • Packager
  • Vectorian
  • ****
  • Posts: 3261
  • -- Just being myself --
Re: VNC over SSH
« Reply #1 on: July 04, 2011, 10:43:25 pm »

Logged

nightflier

  • Administrator
  • Vectorian
  • *****
  • Posts: 4086
Re: VNC over SSH
« Reply #2 on: July 05, 2011, 05:40:03 am »

To access display 0, use "x11vnc" on your server. It is in the VL6 "extra" repo.

I use this kind of setup daily, both locally and for computers in a remote location. On the LAN, behind a firewall, I don't worry about the SSH tunnel. If you want to access the machine from the Internet, a separate discussion about port forwarding and security is in order.
Logged

M0E-lnx

  • Administrator
  • Vectorian
  • *****
  • Posts: 3218
Re: VNC over SSH
« Reply #3 on: July 05, 2011, 06:52:42 am »

Freenx is your friend.  VNC is way too slow, and by default unencrypted.  FreeNX runs inside a SSH tunnel by default, and is quite fast.

newt

  • Vectorian
  • ****
  • Posts: 1132
Re: VNC over SSH
« Reply #4 on: July 05, 2011, 10:46:52 am »

Freenx is your friend.  VNC is way too slow, and by default unencrypted.  FreeNX runs inside a SSH tunnel by default, and is quite fast.
Not sure if your blog post on the subject is still relevant considering the amount of time since it's posting:
http://m0e-lnx.blogspot.com/2009/05/howto-setup-freenx-server-on-your.html
« Last Edit: July 05, 2011, 02:10:53 pm by newt »
Logged

M0E-lnx

  • Administrator
  • Vectorian
  • *****
  • Posts: 3218
Re: VNC over SSH
« Reply #5 on: July 05, 2011, 01:48:44 pm »

That needs to be revised for VL7.  But i'm not sure we have VL7 packages in the repos for this, although the slack 13.0 and 13.1 builds work fine... I use this to access my server + virtual machines remotely.

Here is a link to the packages
http://connie.slackware.com/~alien/slackbuilds/freenx/pkg/13.0/
Download all the .tgz files and do installpkg on them.
Find or build a netcat package
Find or build an xdialog package

The most common problem after installation is a locked "nx" account.  To diagnose any session problems, run `tail -f /var/log/messages` while trying to connect from a remote host (note: connecting from the local machine will not work).

If you see something saying user nx is not allowed, see here
http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:nx

bigpaws

  • Vectorian
  • ****
  • Posts: 1869
Re: VNC over SSH
« Reply #6 on: July 05, 2011, 01:55:00 pm »

My minecraft server runs as nogui. I use ssh to connect to administer the
server.

Then no need for GUI.

How well is your server performing? I have a 2.4 dual core with 2 gigs of RAM
and it is tight for that. Ram is almost completely used.

Bigpaws
Logged

M0E-lnx

  • Administrator
  • Vectorian
  • *****
  • Posts: 3218
Re: VNC over SSH
« Reply #7 on: July 05, 2011, 02:16:16 pm »

Mine is not a gaming box.  My server has 1 2.5ghz core2quad with 4g ram.  I run at least 2 virtual machines + the host simultaneously almost at all times.  still has a lot of breathing room.

my linux virtual machines run in text mode only.  the nx server still works when the os boots to text mode only.

nightflier

  • Administrator
  • Vectorian
  • *****
  • Posts: 4086
Re: VNC over SSH
« Reply #8 on: July 05, 2011, 03:11:32 pm »

Lots of good info here. Quick return to OP's question:

To establish an SSH tunnel for VNC to your server, use command:
Code: [Select]
ssh -L 5900:localhost:5900 IP.OF.VL.BOX
then connect to localhost using vnc:
Code: [Select]
vncviewer localhost
Logged

M0E-lnx

  • Administrator
  • Vectorian
  • *****
  • Posts: 3218
Re: VNC over SSH
« Reply #9 on: July 05, 2011, 04:37:07 pm »

definitely. ssh is a powerful thing. ive done that and http traffiy tunneling [proxy]. but for remote desktop, vnc is only good for lan access. from outside your lan, the lag is brutal.  Thats why i use nx