using vino/vncviewer
Craig Bladow
tmr0 at freeshell.org
Tue Oct 12 01:55:59 UTC 2004
Crash course on using sshd to secure vnc. There are other options and
ways to do this but this is what works for me.
>From Applications->System Tools->Root terminal:
1. apt-get install sshd
2. edit /etc/hosts.allow
add the lines (if not present):
ALL: 127.0.0.1
sshd: remote.ip.add.ress1 remote.ip.add.ress2
3. /etc/init.d/inetd restart
4. From Applications->System Tools->Terminal
Test by logging in: ssh localhost
you should get a password prompt and login. Type: exit
You can also test from another computer on your local network.
>From Applications->System Tools->Root terminal:
5. edit /etc/hosts.deny
add the line (if not present):
ALL: ALL
6. /etc/init.d/inetd restart
7. Test again as described in step 4.
8. Configure your router to forward port 22 to the ip address of your
machine.
9. From a remote machine use ssh (or Putty if on Windows) to connect
to the external ip address of your router.
For *nix or cygwin create/edit a file called 'config' in your
home/username/.ssh directory
config contains:
host mycoolsshservername
hostname ip.add.ress.here
port 22
user myusernamehere
compression yes
localforward 5900 localhost:5900
localforward 5901 localhost:5901
After you save your config file type: ssh mycoolsshservername
There is also a way to put all that on the command line see: man ssh
In putty (I'm doing this from memory) you want to set up the ip
address, select ssh and then create a tunnel that forwards a local vnc
port e.g. 5900 or 5901 to the Ubuntu machine's ip address which can be
localhost or 127.0.0.1 or the internal ip address.
After you have made the ssh connection start vncviewer and point it to
localhost:0 or localhost:1 you should be prompted for your vncserver
password.
Notes:
Be sure to go the route of hosts.allow and hosts.deny to limit the ip
addresses that are allowed to connect to your server.
Hope this helps (and that I didn't miss anything)
Craig Bladow
On Mon, 2004-10-11 at 07:24, Hubertus Hiden wrote:
> paul hendrick wrote:
>
> >Hi,
> >i've never used vnc before, and i'm interested in trying it out to
> >control my computer while i'm in uni.
> >i'm connected to the internet through a router though, so how can i
> >connect from an outside computer, directly to this pc?
> >
> >also, if i run vncviewer localhost.localdomain:0, i get a vnc window
> >with my desktop visible, but this desktop respawns another one, then
> >another one within that one, and so on. so it's not usable for me.
> >it this normal?
> >
> >cheers!
> >
> >
> >
> Hi Hendrik !
>
> In case you have a hardware router you could simply use portforwarding
> This is mostly accessible from the routers configuration page. There you
> can specify that ie. Port 5950 (but im not sure) gets forwared to
> IP_of_VNC_server:5950.
>
> Another (much more secure) solution but more complicated to setup would
> be the use of ssh.
>
> Maybe you could give us some more details...
>
> Hubertus
>
> --
>
> HIDEN - EDV mit System
> Ing. Hubertus Hiden
> Schwöbing 12
> A-8670 Krieglach
>
> Tel: +43 3855 2358
> +43 664 2209313
> Mail: hubertus at hiden.org
> URL: http://www.hiden.org
--
Craig Bladow <tmr0 at freeshell.org>
More information about the ubuntu-users
mailing list