sysblogd

Ubuntu: Connect to your Windows machine securely using VNC and SSH with little installation

Monday, 7th Jan 2008 at 19:21 (administration, linux, ubuntu)
Tags: login, openssh, remote access, remote desktop, ssh, ubuntu, vnc, windows

This will show what needs to be set-up and installed to use a secure line from a Linux box (eg. Ubuntu) to a Windows box via SSH-tunneled VNC but without the load of Cygwin installed on Windows. I used the nicely small package SSHWindows.

SSH server for Windows (on Windows machine)

  1. Download SSHWindows and run the installer. An alternative could be WinSSHD from bitvise. It’s 30 days trail and closed, though. You’ll be prompted with the warning to edit the passwd file. Read quickinstall.txt or readme.txt for more details located in the install folder for %PROGRAMFILES%\OpenSSH\docs (hit WIN-KEY+R and copy&paste the path there for quick access).
  2. From a prompt cd to %PROGRAMFILES%\OpenSSH\bin. (WIN+R and type cmd, hit ENTER, c: ENTER, cd %PROGRAMFILES%\OpenSSH\bin)
  3. Run the following (replace <username> with the Windows username that should log in from Ubuntu):
    mkgroup -l >> ..\etc\group
    mkpasswd -l -u <username> >> ..\etc\passwd
  4. Start opensshd as Windows service:
    net start opensshd
  5. Open incoming port in Windows firewall:
    netsh firewall add portopening TCP 22 "OpenSSHd"
    The “OpenSSHd” bit can be chosen individually; it’s only a string to identify this entry.
  6. Test login locally with eg. PuTTY and than test it from the Linux box (ssh winuser@winip). You might need to do some firewall (Windows and/or iptable) config. If your Linux box has to go through some kind of router/firewall machine you’ll most likely have to add port forwarding on that firewall to pass port 22 (SSH port) to the windows machine’s IP.

Install TightVNC (on Windows machine):

  1. Don’t forgett to click the options to setup VNCServer as Windows service and start it after installation.
  2. Open TCP port 5900 temporarily for testing like for opensshd:
    netsh firewall add portopening TCP 5900 "VNCincoming"
  3. Test it from Ubuntu with vncviewer <windows-machine-ip>
  4. If it works close the port in Windows firewall. You won’t need that hole any longer:
    netsh firewall delete portopening TCP 5900
  • Configure tunneling VNC through SSH (on Linux box):
  1. ssh -L <local port>:<remote computer>:<remote port> <user>@<remote ip> and vncviewer 127.0.0.1
  2. Test vnc connection again using -via option: vncviewer -via user@host localhost:0
  • Use compression in ssh?
  • GNOME applet/shell skript?

References:

  • Ubuntu guide to set up Ubuntu and Windows using Cygwin
  • Tunnel VNC through SSH
  • SSHWindows
  • TightVNC (VNC Server for Windows) with their Win32-Documentation
  • VNC over SSH : securing the remote desktop
  • Command Line Manipulation of Windows XP SP2 Firewall
  • Information on the vncviewer -via option
  • SSH Tunneling Made Easy
  • Using VNC Tunneling over SSH

  • Welcome !

    Sit back and enjoy. Mind a cookie?
  • Shoutcast

    Love is where you don't feel sorry -- and therefor love is where you are free. -myself

    Live is a treasure island; it would be too bad if someone went without filling their pockets. -myself

    The only real voyage of discovery consists not in seeking new landscapes, but in having new eyes. -Marcel Proust

    For one human being to love another; that is perhaps the most difficult of all our tasks... the work for which all other work is but preparation. -Rainer Maira Rilke

    Authorities define reality. -myself

    Life is music written by the moment with every creature being individual notes on the score of time. -myself

  • Feed Options

    The following feeds are available on my blog:

    all posts

    all comments

    specific post with it's comments by adding "/feed" to post's url, e.g. Opera Flash post

  • Recent Comments

    E.M. on Let Bash do the math: Doing ca…
    jaenmedina on Let Bash do the math: Doing ca…
    sysblog on Howto Extract all Files from M…
    MSM on Howto Extract all Files from M…
    sysblog on Learn Python in 100 Python Ses…
  • Recently Posted

    • Batch Rename Multiple Files with Linux
    • One hack of a perfect (as in jack of all trades) backup solution for Ubuntu Linux (remote, flexible, instant restore, automated, reliable)
    • Ubuntu Linux backup utilities and links
    • Convert multiple Flash (flv) Videos to, for example, MPEG encoding
    • Opera: X Shared memory extension is not available. ZPixmap not supported
  • Top Posts

    • Let Bash do the math: Doing calculations using that bash
    • Recover Data and (deleted) Partition with Linux from Hard Drives, CD-ROMs or DVDs
    • Ubuntu: Changing Hostname from Command Line
    • How to Build a Windows XP SP3 Integrated Installation CD
    • How to Move VirtualBox's Guest Hard Drives to Another (Physical) Location
    • Howto Extract all Files from Microsoft Installer Files (msi) rather than to Install the Package
    • Drupal 6: Redirect Users to your Frontpage/Startpage/node after they logged in
    • Changing from Outlook to Thunderbird: Calender Export/Import
    • Ubuntu Hardy Heron Dist-Upgrade via Command Line
    • Ubuntu: Mounting remote filesystem using sshfs (FUSE)
  • Tags

    apt aptitude art audio bash batch cmd cml cms command line convert debian desktop digital lifestyle digital music drupal ebay fb2k flash foobar2000 fuse google graphics hardware Hardy Heron joomla lifestyle linux music opera privacy programming scripting security skype software ssh svg thunderbird ubuntu video web 2.0 webdesign windows wordpress
  • Licence

    Creative Commons License
    sysblogd webblog by sysblogd is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.

  • Category Cloud

    administration audio digital music diploma thesis foobar2000 fun stuff ideas informatics linux music open source scripting security software technical stuff ubuntu webdesign windows
  • Blog Stats

    • 244,811 hits and counting
  • blogroll

    • Aussietracker’s Blog
    • drea’s south africa blog
    • Linux and Open Source Blog
    • My listening habbits
    • Posts on Diploma Thesis
    • Puki’s Blog
    • techtoppicks::
  • music

    • My listening habbits
  • RSS Music I’ve been listening to

    • Kosheen – Overkill
    • Victor Wooten – Cell Phone
    • Audioslave – Like A Stone
    • Nonpoint – The Longest Beginning
    • Zentrifugal – Tat Oder Wahrheit
    • Donots – Rollercoaster
    • Donots – Rollercoaster
    • Donots – No Means No
    • Nonpoint – Broken Bones [Live]
    • Guano Apes – 360 Aliendrop (Kaleve mix)
  • RSS Lastest from America’s Cup 2007

    • The 33rd America's Cup will feature bigger, faster boats
    • The 32nd America's Cup in concept and figures
    • Quotes of The Day: Press Conference on the Protocol for the 33rd America's Cup
    • Alinghi hoists the America's Cup for a second time
  • Fav Programms:

    Ubuntu - humanity towards others

    foobar2000 audio player

    Opera - the smoothest web browser

    Songbird; Play the web

  • Flickr Photos

    Merry Christmas to You!

    three hundred six: My Way

    beam me up

    missing her terribly...

    More Photos

Blog at WordPress.com. · Theme: Thirteen by Beccary