LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-11-2005, 10:13 AM   #1
Dillius
Member
 
Registered: Jan 2004
Location: Georgia
Distribution: Debian Etch
Posts: 99

Rep: Reputation: 15
ssh with vnc


I've seen plenty of these posts, and i've searched up even more of them. I've googled lots of little instructions up too, but maybe i'm just missing something.

I am, quite simply, just trying to tunnel vncviewer through SSH. It seems that no matter what syntax I try this thing just isnt working, so i'm breaking down and posting about it.

Here are the many syntax's i have both seen and tried, and yet I still can not get it to work.

ssh -L 5902:{remotecompip}:5901 -> syntax error aparently

apparently I was supposed to specify another IP address at the end of this statement

ssh -L 5902:{remotecompip}:5901 {localcompip}

All this accomplishes is myself logging into the local computer. I also attempted to swtch the local comp ip and the remote comp ip, at which point i simply logged into the remote machine with SSH. Something tells me this is not really what i'm looking to do, as I don't see why i need to remotely connect just to forward the port.

Would greatly appreciate someone clearign up this problem for me.

EDIT: Changed some writing due to evil invading smilies

Last edited by Dillius; 03-11-2005 at 10:14 AM.
 
Old 03-11-2005, 04:53 PM   #2
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
I use x11vnc to do it. On the client, a Windows laptop in my case, I use plink to make the connection. I have a shortcut on my desktop that just runs the following:
Code:
"C:\Program Files\Putty\plink.exe" -L 5900:localhost:5900 hammer@192.168.1.2 `runx11vnc`
On the server, this is what runx11vnc consists of:
Code:
#!/bin/sh

x11vnc -rfbauth $HOME/.vnc/passwd -display :0
After entering the password, you should see something like this:
Code:
11/03/2005 16:48:03 setting up 32 cursors...
11/03/2005 16:48:03   done.
11/03/2005 16:48:03 Autoprobing TCP port
11/03/2005 16:48:03 Autoprobing selected port 5900
11/03/2005 16:48:03 created 32 tile_row shm polling images.
11/03/2005 16:48:03 screen setup finished.
11/03/2005 16:48:03
11/03/2005 16:48:03 The VNC desktop is corvette:0
At that point, you can just exit that window, it's no longer needed. Then on the client, use your vncviewer to log in as normal. I like Tightvnc personally, but Realvnc will work as well.

There are several different ways of doing it, but this is what works for me. Good luck.

Note: If you use the "runx11vnc" script above, you'll need to make it executable and place it in your PATH. I have it at /usr/local/bin/runx11vnc. You'll also need to already have set a vnc password if you use the password auth.

Last edited by DaHammer; 03-11-2005 at 04:56 PM.
 
  


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
VNC over SSH or ????? alirezan1 Mandriva 2 01-04-2005 10:55 AM
vnc with ssh lawkh Linux - Newbie 1 02-10-2004 01:12 AM
ssh and VNC linuxnube Linux - Security 4 01-28-2004 10:12 PM
how to use vnc with ssh ? norikage Mandriva 9 08-30-2003 12:40 PM
VNC on SSH??? Jerry78 Linux - Newbie 3 07-17-2003 03:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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