LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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-13-2009, 05:25 AM   #1
lothario
Member
 
Registered: Apr 2004
Posts: 340

Rep: Reputation: 30
using VNC with SSH


I have 3 linux desktop systems.

Desktop1 has one network card with:
IP address 192.168.3.12

Desktop2 has two network cards with:
IP address 192.168.3.47 and
IP address 192.168.6.25 respectively

Desktop3 has one network card with:
IP address 192.168.6.38


From Desktop2, I can do:
vncviewer 192.168.3.12
and
vncviewer 192.168.6.38

From Desktop1, I would like to:
vncviewer 192.168.6.38

But I cannot do this, because Desktop1 and Desktop3 are on different subnets.

I understand that I can use ssh on Desktop2 to do some kind of port forwarding such that I can vnc into Desktop3 from Desktop1 via Desktop2.

Could you please show me how to forward ports with ssh to do this?
 
Old 08-13-2009, 05:33 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
[user@host1]# ssh user@host2 -L 1234:host3:5901
[user@host1]# vncviewer localhost:1234
 
  


Reply



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
VNC Over SSH | Linux laptop -> Linux SSH Server -> Windows VNC Server jakestaby Linux - Networking 3 01-28-2009 02:33 PM
VNC through SSH ohswrestler2009 Linux - Newbie 2 10-16-2007 05:17 PM
SSH and VNC bandersen Linux - Newbie 5 03-29-2004 05:53 AM
ssh and VNC linuxnube Linux - Security 4 01-28-2004 10:12 PM
VNC on SSH??? Jerry78 Linux - Newbie 3 07-17-2003 03:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:34 AM.

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
Open Source Consulting | Domain Registration