LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 08-26-2007, 04:14 PM   #1
MykeV
LQ Newbie
 
Registered: Jan 2006
Location: North Carolina, Raleigh
Distribution: Ubuntu 6.10, Suse 10.2
Posts: 12

Rep: Reputation: 0
VNC won't connect to local PC via SSH


Hey, Here's what i am doing. I am at a remote location and want to access a PC on my home network. My home network is protected from the internet by a firewall which is running on a Linux box. The Linux box has SSH installed and it runs fine (I have in the past, from remote locations, connected to Linux box and used it as a proxy). When at home, and connected directly to my local network, i can easily connect to the desktop PC over a VNC connection.

What i'm working with:

Laptop [(WinXP),OpenSSH,VNC viewer] @remote location

Firewall [(IPCop),SSH *listening*] -Local network
Desktop [(WinXP), VNC server *listening*] -Local network

I am attempting to connect like this...
Code:
ssh -L 5900:192.168.50.55:5900 user@HomeNetwork.com
connection successful...

Then i launch a vncviewer session
Code:
vncviewer 192.168.50.55:5900
connection fails...

The result is that i am able to connect to the Linux box and execute commands but i am unable to initiate a VNC viewer session with the local desktop PC. The only thing i see that may be the problem is that the local port vncviewer initiates its connection on is dynamic and won't necessarily connect on the port (5900) i want it to use. I don't know

Can someone tell me what i am doing wrong. Thx.

Last edited by MykeV; 08-26-2007 at 04:16 PM. Reason: add tags
 
Old 08-26-2007, 04:41 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
i don't think you're understanding what the ssh tunnel gives you. your vnc viewer is trying to make no use of the tunnel at all... try "vncviewer 127.0.0.1:5900" to use it correctly based on what you've set up.
 
Old 08-27-2007, 01:01 AM   #3
MykeV
LQ Newbie
 
Registered: Jan 2006
Location: North Carolina, Raleigh
Distribution: Ubuntu 6.10, Suse 10.2
Posts: 12

Original Poster
Rep: Reputation: 0
Oh.....

I used 127.0.0.1 (or localhost)like you said and my connection was established. No problemo!

Thx alot Mr. Mod.
 
  


Reply

Tags
ssh tunnel, vncviewer


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
setting up an ssh soxy or local ssh tunnel from within an ssh soxy Mangenius Linux - Networking 0 03-05-2007 04:15 PM
ssh wont connect outside of local network clintonkerr Linux - Software 9 09-20-2005 08:35 AM
Samba: can't connect to my local linux machine but can connect to windows. Royle Linux - Networking 3 01-18-2005 06:32 PM
VNC and rc.local woranl Linux - Networking 2 08-09-2004 12:43 PM
run vnc-server as other user in rc.local jvdbossc Linux - Newbie 2 05-26-2004 03:10 AM


All times are GMT -5. The time now is 11:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration