LinuxQuestions.org
Review your favorite Linux distribution.
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 05-06-2004, 08:16 AM   #1
c_mitulescu
Member
 
Registered: Nov 2003
Location: London
Distribution: Ubuntu
Posts: 35

Rep: Reputation: 15
Question VNC over SSH. Windows client - Linux Server


Hi,
I recently started a job where all the workstations have windows on them and I find that difficult to bare. I need my daily shot of Linux ;-)

I have been trying to use VNC to connect to my Linux box at home over SSH. I have Mandrake Linux 10 installed with tightvnc-server and ssh server. My server sits behind a Linksys router with port 22 forwarded to the serv.

At work I downloaded Putty for windows and TightVNC Viewer. I set up putty to forward 5901 to localhost:5900 and I can remotely connect via SSH to my home server.
The next bit is where I can not proceed beyond:
Logged in via ssh to my Linux server I issue the command
vncserver -geometry 1024x768 -depth 16:2 and after the initial questions about passwords(when I ran it for the first time) it seems that the Xvnc is started on screen 2.
If I open my VNC viewer and point it at localhost:0 the vnc viewer reports that "Failed to connect to server"

localhost::5901 makes the Vnc viewers connection dialogue dissapear without any error message but nor do I get the remote desktop.

localhost::5900 reports "failed to connect to server

localhost:1 has the same effect as localhost:5901

This is all tested whith the ssh connection open to my linux machine.

Please help me figure out what I might be doing wrong or any setting I have not configured,
 
Old 05-06-2004, 08:41 AM   #2
wheatstraw
LQ Newbie
 
Registered: May 2004
Location: Florida
Distribution: Gentoo, Debian
Posts: 7

Rep: Reputation: 0
Hey c_mitulescu,
I just put an article on my webpage about what you are trying to do:

http://wheatstraw.is-a-geek.org/VNC%...Tunneling.html

I copied the article and edited it to reflect my scenario, which was very similar to yours. I used to connect to my home network (linux, of course) from the windoze network at the office. I think one of your trouble lies in the port forwarding setting in PuTTY. If you start the vncserver on display 2 (vncserver -geometry 1024x768 -depth 16:2) you would have to forward to port 5902. If you try to connect to the wrong display, you won't get an error message from the vnc client on windows, the connection dialog will just disappear.

I hope this helps! It's great to have access to linux from work.

Wheatstraw
 
Old 05-06-2004, 03:02 PM   #3
adm1329
Member
 
Registered: Mar 2004
Distribution: CentOS 5
Posts: 128

Rep: Reputation: 17
Re: VNC over SSH. Windows client - Linux Server

Quote:
Originally posted by c_mitulescu
I set up putty to forward 5901 to localhost:5900 and I can remotely connect via SSH to my home server.
Set up putty to forward 5901 to your ip:5900 and it should work. Forwarding it to localhost just forwards it to the same computer you're on. And you should be able to connect via localhost:1 once the putty connection is up.

Last edited by adm1329; 05-06-2004 at 03:06 PM.
 
Old 05-07-2004, 08:24 AM   #4
c_mitulescu
Member
 
Registered: Nov 2003
Location: London
Distribution: Ubuntu
Posts: 35

Original Poster
Rep: Reputation: 15
Yeeeaaahhhhh! It feels so much better now- getting my shot of Linux while at work. Eat this M$ lol.
We have quite a number of policies at work not allowing us to be registered to newsgroups, IM etc so I knew I could count on Linux.

The problem was with my tunneling. the setting that seems to work is localhost:5900 forwarded to localhost:5901. I had it the other way arround after reading an internet "tutorial" on how to do it.

Thanks for the help.
PS - Im at work writting this over SSH on a VNC connection to my home box
 
Old 05-07-2004, 12:20 PM   #5
wheatstraw
LQ Newbie
 
Registered: May 2004
Location: Florida
Distribution: Gentoo, Debian
Posts: 7

Rep: Reputation: 0
Sweet!!!!!

Glad to be of help!
 
Old 05-28-2004, 10:36 PM   #6
oldweasel
LQ Newbie
 
Registered: Sep 2002
Posts: 18

Rep: Reputation: 0
wheatstraw?

wheatstraw are you still sround? Do you know of a way to send sound over the putty ssh connection?
 
Old 05-30-2004, 07:30 PM   #7
wheatstraw
LQ Newbie
 
Registered: May 2004
Location: Florida
Distribution: Gentoo, Debian
Posts: 7

Rep: Reputation: 0
Hey oldweasel,
I am still looking, but so far I have found this:

http://www.liquid-reality.de/main/projects/esound

It is a link to an esound binary for windows with instructions. The part that would make me nervous is the comment about "donīt do this with a machine connected to the internet" . Maybe there is another option besides "public" for the binary. I will play around with it and let you know if I figure anything out.

Good idea, by the way!

wheatstraw
 
Old 05-30-2004, 07:45 PM   #8
wheatstraw
LQ Newbie
 
Registered: May 2004
Location: Florida
Distribution: Gentoo, Debian
Posts: 7

Rep: Reputation: 0
Just found a few interesting things. Check these out:

http://www.ergotech.com/misc/VNCProxy.html
http://www.nocrew.org/software/httptunnel.html

They don't deal with the audio issue, but help with a more restrictive work proxy.
 
Old 06-03-2004, 09:43 PM   #9
jwjody
Member
 
Registered: Sep 2003
Posts: 37

Rep: Reputation: 15
I'm having trouble setting this up.

In the putty SSH tunnel setting for source port I have 5901 then for destination i have the IP_address:5901.

Then I connect to the remote computer and vncserver -geometry 800x600.

Then I go to VNC connection details and choose localhost::5901 and it says it must be in the format of localhostort. So I take out one of the :'s and then it says it can't connect to the server.

What am I doing wrong?

Thanks,
J
 
Old 06-03-2004, 09:56 PM   #10
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,791
Blog Entries: 1

Rep: Reputation: 414Reputation: 414Reputation: 414Reputation: 414Reputation: 414
Try localhost:1. Also be sure that your vncserver is running on screen 1. That translates to port 5901. If it is running on a different screen, say :2, that would translate to port 5902 and you would connetct using localhost:2
 
Old 06-03-2004, 10:46 PM   #11
jwjody
Member
 
Registered: Sep 2003
Posts: 37

Rep: Reputation: 15
Quote:
Originally posted by Hangdog42
Try localhost:1. Also be sure that your vncserver is running on screen 1. That translates to port 5901. If it is running on a different screen, say :2, that would translate to port 5902 and you would connetct using localhost:2
I tried that also. When I go back to the Putty settings though for tunneling my previous settings are gone and I have to keep reentering the source port, the remote address and add to forwarding.

Is that the problem?

Edited to add: I fixed it!

Thanks!

Last edited by jwjody; 06-03-2004 at 10:49 PM.
 
Old 06-09-2004, 03:50 AM   #12
treotan
Member
 
Registered: Jun 2004
Posts: 126

Rep: Reputation: 15
me too! Let me talk my situation!
In the Office-
WinXP
In the Home-
Linksys router
Fedora

I installed the VNCserver to my linux box, and just type vncserver; after that it prompted to type password, I followed that.
I openned the port 5899 to 5900. Right?
I went back to office next day, try login by vnc-3.3.7-x86_win32_viewer. It failed. I typed "IP:1" and "IP:5900", it also failed.

What port do I need? and What setting do I need to config?
 
Old 06-09-2004, 08:34 AM   #13
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,791
Blog Entries: 1

Rep: Reputation: 414Reputation: 414Reputation: 414Reputation: 414Reputation: 414
Quote:
I installed the VNCserver to my linux box, and just type vncserver
After you typed vncserver, you should have gotten a message telling you what screen vncserver was monitoring. If it said screen :1 then vncserver is running on port 5901. If it said screen :2 then vncserver is listening on port 5902. Once you figure out what screen it is running on, you connect using ipaddress:screen#. In the examples I just gave that would be something like 1.2.3.4:1 or 1.2.3.4:2 where you replace the 1.2.3.4 with the IP address of the computer running vncserver.


Quote:
I openned the port 5899 to 5900. Right?
No, that's wrong. See what I wrote above to figure out what ports to open.


Quote:
I went back to office next day
You should be aware that VNC is horribly insecure. If you are connecting over the internet using nothing but VNC you may as well hang out a sign that says "HACK MY RIG AT THIS IP ADDRESS" in big neon letters. Do some searching here on running VNC over an SSH tunnel.
 
Old 06-09-2004, 09:38 AM   #14
treotan
Member
 
Registered: Jun 2004
Posts: 126

Rep: Reputation: 15
Thanks! Hangdog,

I got your message! I already config the statis IP of the Linux box, and openning the vncserver! But it cannot access by my wireless laptop (Window 2000), it failed the connection. Why? Actually this is in LAN environment!

Treo
 
Old 06-09-2004, 10:03 AM   #15
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,791
Blog Entries: 1

Rep: Reputation: 414Reputation: 414Reputation: 414Reputation: 414Reputation: 414
You really need to supply the details when you say something doesn't work. When you start vncserver, what screen is it starting on? What are you typing into the vncviewer to connec? Can you make other kinds of connections between your laptop and the linux box (like FTP or ssh)? Can you connect if you turn off your firewall? Right now you are giving me absolutely nothing to go on.
 
  


Reply


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
Server in Linux and Client in Windows dinwwf Programming 4 08-31-2005 10:37 AM
Rsyncing between windows client and gentoo server, over ssh, using key for auth. Passive Linux - Networking 0 08-03-2005 12:05 PM
can not connect to my pureftp server from Linux client, but i can from windows client bonito Suse/Novell 5 03-16-2005 10:45 PM
VNC Server (on Ubuntu) Client on Windows sim2k Linux - Networking 10 02-10-2005 04:22 AM
Running a Linux desktop on a Windows client using VNC spartanM19SSM Linux - Networking 19 12-13-2004 08:34 PM


All times are GMT -5. The time now is 04:54 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