Other SSH + indirect VNC

Discussion in 'Software' started by TheAbyssDragon, 6 Aug 2009.

  1. TheAbyssDragon

    TheAbyssDragon Gafgarion

    Joined:
    8 Dec 2005
    Posts:
    109
    Likes Received:
    0
    I have a home server which I can SSH into, and then tunnel a VNC connection through. I'm now in a situation where I would like to have VNC access to my desktop occasionally.

    Is it possible for me to SSH to my server (and get me inside the network) and then VNC from there to my desktop?

    I've already attempted to set it up, but have not had any success.
     
  2. Delphium

    Delphium Eyefinity enabled

    Joined:
    18 Mar 2007
    Posts:
    1,406
    Likes Received:
    35
    Yes..
    I assume you have created a tunnel with correct forwarding such as below in putty here..?

    [​IMG][​IMG]


    Then you should be able use vnc to connect to localhost.
    [​IMG]


    If this does not work, then you will need to ensure that the vnc server has local loopback or that the correct ip ranges are in its allow list, depending on what vnc server you use.

    [​IMG](ReaVNC)

    - or -
    [​IMG](TightVNC)
     
    Last edited: 6 Aug 2009
    Zoon likes this.
  3. TheAbyssDragon

    TheAbyssDragon Gafgarion

    Joined:
    8 Dec 2005
    Posts:
    109
    Likes Received:
    0
    Yes, except the SSH tunnel in PuTTY points to my desktop via its local ip, instead of 127.0.0.1.
     
  4. TheAbyssDragon

    TheAbyssDragon Gafgarion

    Joined:
    8 Dec 2005
    Posts:
    109
    Likes Received:
    0
    I should probably point out the following details:

    Desktop:
    TightVNC
    Windows 7

    Server:
    TightVNC (not that this is at issue)
    OpenSSH
    Ubuntu 9.04

    Client:
    TightVNC Viewer
    OS varies
     
  5. Delphium

    Delphium Eyefinity enabled

    Joined:
    18 Mar 2007
    Posts:
    1,406
    Likes Received:
    35
    In which case you will want to put the IP of the desktop pc into putty :)

    [​IMG]


    You will still use localhost on the VNC client. :)
     
    thehippoz and badders like this.
  6. badders

    badders Neuken in de Keuken

    Joined:
    4 Dec 2007
    Posts:
    2,635
    Likes Received:
    72
    ooooh! This will help me too! thanks Delphium!
     
  7. TheAbyssDragon

    TheAbyssDragon Gafgarion

    Joined:
    8 Dec 2005
    Posts:
    109
    Likes Received:
    0
    So far that's nearly identical to my current configuration. I've managed to get so far as being prompted for a password. Upon entering the correct password, I get a connection closed error.

    I'm gonna try googling around when I have time.
     
  8. TheAbyssDragon

    TheAbyssDragon Gafgarion

    Joined:
    8 Dec 2005
    Posts:
    109
    Likes Received:
    0
    I think the issue may be tied to the fact that TightVNC cannot run as a service in Vista/7, and must run as an application. Combined with password on screen saver, this may be locking me out.
     
    Last edited: 7 Aug 2009
  9. Delphium

    Delphium Eyefinity enabled

    Joined:
    18 Mar 2007
    Posts:
    1,406
    Likes Received:
    35
    Ahhhhhh yes of cause...... (suddenly recalls thats why I use realvnc (personal edition) on my vista box).

    Forgive me for overlooking this, it is afterall something I setup and struggled with about 2 years ago heh.
    Tight VNC will need to run as the user (in administrator mode) and not as the system, and UAC will need to be turned off.

    EDIT:
    You can load it as a service that loads under your user login/profile (something along the lines of adding "ShellRunAs" (part of the sysinternal tools) as a service which will load tight VNC server under a different user account from that of "system" or either PSexec again by sysinternals, which allows you to call a exe,bat,cmd with elevated rights.).

    EDIT:
    reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run /v ServiceName /d "c:\path\to\service\file.exe"
    PSexec.exe -u user -p pass -d "c:\program files\tightvnc\winvnc.exe"

    With the above lines you should be able to mount PSexec as a service to run tight vnc as a different user for you automaticly... unfortunately I am unable to test this right now as I am at work.

    Or use Ultra VNC server which is compatible with vista.
     
    Last edited: 7 Aug 2009
    TheAbyssDragon likes this.
  10. badders

    badders Neuken in de Keuken

    Joined:
    4 Dec 2007
    Posts:
    2,635
    Likes Received:
    72
    Hmmm,
    I can see my desktop, but can't do anything with it (despite not being in view-only mode)
    I'm sure it'll be a setting somewhere, but I'm not sure which.
    Any ideas?
     
  11. TheAbyssDragon

    TheAbyssDragon Gafgarion

    Joined:
    8 Dec 2005
    Posts:
    109
    Likes Received:
    0
    I'm at work also and unable to test.

    I think I may try to run it as a task, using the system account, that's launched on boot (not log in). I have similar tasks created for anti-virus/spyware and drive imaging that run weekly.

    (On an unrelated note, I've found anti-virus scans to be superfluous. Any time I manage to do something stupid enough to get some kind of malware, it gets caught by the real time scanner.)
     
  12. Delphium

    Delphium Eyefinity enabled

    Joined:
    18 Mar 2007
    Posts:
    1,406
    Likes Received:
    35
    As I say, you could also give UltraVNC server a try, which now has support for Vista, should you not wish to setup a service.


    Which vnc server and which OS you using?
     
    Last edited: 7 Aug 2009
  13. badders

    badders Neuken in de Keuken

    Joined:
    4 Dec 2007
    Posts:
    2,635
    Likes Received:
    72
    TightVNC and Win7 RC.
    Thing is, I'm sure it must be a tunneling issue, as VNC works perfectly on the LAN.
    I have port 5900 added to Putty, which enables me to connect, but even sending a Ctrl-Esc (windows Key) command has no effect.
     
  14. Delphium

    Delphium Eyefinity enabled

    Joined:
    18 Mar 2007
    Posts:
    1,406
    Likes Received:
    35
    *Fires up his virtual machine and checks tightvnc settings........

    EDIT...
    Ok so my setting in TightVNC Server are as follows....

    [​IMG] [​IMG] [​IMG] [​IMG] [​IMG]

    With putty and the vnc client setup as above in previous post.


    If TightVNC still fails with Win7 RC then perhaps try with UltraVNC server and see if you have any better luck.
    Allthough my screenshots are form an XP system, I know the same settings work fine under vista (installed and working on friends pc).
     
    Last edited: 7 Aug 2009
  15. TheAbyssDragon

    TheAbyssDragon Gafgarion

    Joined:
    8 Dec 2005
    Posts:
    109
    Likes Received:
    0
    If you decide to follow Delphium's configuration, I should point out that the last two digits of the port equal the display number. So in his configuration (on display 1) you'd use port 5901 and not 5900.
     
  16. Delphium

    Delphium Eyefinity enabled

    Joined:
    18 Mar 2007
    Posts:
    1,406
    Likes Received:
    35
    Ahh yes, I should have pointed out that, as its a virtual machine on the same machine as my normal VNC server I chose to run it on a different port.
     
  17. badders

    badders Neuken in de Keuken

    Joined:
    4 Dec 2007
    Posts:
    2,635
    Likes Received:
    72
    Yep, that all seems fairly standard.
    As soon as the Missus gets home I'll get her to wake the PC up, and try the web interface - might have more luck with that.

    Cheers chaps :)
     
  18. TheAbyssDragon

    TheAbyssDragon Gafgarion

    Joined:
    8 Dec 2005
    Posts:
    109
    Likes Received:
    0
    Scheduling a task generated the same issue as running as a service, it wouldn't allow connections. I tried both my user account and system account with similar results.

    I'm gonna give uVNC a try.
     
  19. badders

    badders Neuken in de Keuken

    Joined:
    4 Dec 2007
    Posts:
    2,635
    Likes Received:
    72
    UltraVNC works a treat, apart from the lack of multi-monitor support in 1.0.6.4 (due to the mirror driver) It's supposed to be fixed in teh next release, but I can live with it till then!
     

Share This Page