You are not logged in.

#1 2009-04-16 15:26:48

colbert
Member
Registered: 2007-12-16
Posts: 809

SSH/vnc help

My setup is my server and desktop. Currently I am able to ssh back and forth between the two just fine, and I have a regularly used alias in bash to SSH into my server from desktop:

alias sshmyth='ssh -Y -L 5900:127.0.0.1:5900 serverusername@192.168.1.100'

I can also VNC into my server from the desktop with this running on the server:

x11vnc -display :0 -ncache 10 -localhost -loop

And vnc in using this:

vncviewer -truecolour -quality 9 127.0.0.1:5900

Now, I can SSH into my desktop from anywhere (and do so daily from Vista laptop @ office using putty) with the ip and port 22. However, I cannot SSH or VNC into my server, remotely. (And I have tried using vncviewer and no-ip redirect with port 59xx). That's what I'd like to do and am a bit confused, I would really appreciate any help, thanks.

(If more configs/info needed from me I will post of course! smile)

(p.s. I posted this in Mr Green's tightvnc thread but I think my challenges are different here, so didn't want to derail his thread).

Last edited by colbert (2009-04-16 15:27:47)

Offline

#2 2009-04-16 16:18:21

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: SSH/vnc help

Your network details are a bit sparse. Are your desktop and server behind a router, or directly connected to the internet?

Offline

#3 2009-04-16 16:27:52

colbert
Member
Registered: 2007-12-16
Posts: 809

Re: SSH/vnc help

Oops, sorry. Yes, I am using a router with both, a Linksys WRT54GS. I have the ports opened in the router control panel and do not use a firewall.

Offline

#4 2009-04-16 16:29:08

sirius
Member
From: Norway
Registered: 2008-12-25
Posts: 68

Re: SSH/vnc help

(..) ... fail :-)

Last edited by sirius (2009-04-16 16:30:27)

Offline

#5 2009-04-16 17:11:16

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: SSH/vnc help

Well, you do have to do port forwarding to be able to connect inside right? So if you forward port 22 for your desktop it can't also go to your server.
Try changing the ssh port and vnc display on one of your computers so the ports used don't overlap and forward the ports in the router, then give it another try.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#6 2009-04-16 17:45:43

colbert
Member
Registered: 2007-12-16
Posts: 809

Re: SSH/vnc help

Thanks R00KIE, I am so silly I forgot about that. I edited the /etc/sshd_config's for both boxes and opened appropriate ports in router and now can SSH into both just fine remotely.

However I still can't VNC in. I run the x11vnc as in my first post, try the TightVNC viewer from my laptop remotely and it still says failed to connect. I did open up port 5900 on my router as well. ???

Offline

#7 2009-04-16 18:34:39

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: SSH/vnc help

colbert, if you setup to two ssh servers to use different ports as you've done successfully, then just tunnel 5900 with whatever ssh connection you're using at the time.  then vnc to localhost and it'll be whatever box your sshed into.  no other ports need to be open.

Offline

#8 2009-04-16 18:56:22

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: SSH/vnc help

Yes, I agree with brisbin33, open a tunnel with ssh and forward the port, its a _lot_ more secure since everything will go through ssh and no need to open more ports besides the ssh ports. Good call there brisbin33 smile.
Currently I'm using something like this to access remote vnc servers:

ssh user@remote_pc -Cf -L localport:localhost:remote_vncserver_port sleep 10; vncviewer localhost:localport

Works very well smile


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

Board footer

Powered by FluxBB