Announcement

Collapse
No announcement yet.

HOW TO - Remote Control Kubuntu Desktop From Windows 7 Laptop?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    HOW TO - Remote Control Kubuntu Desktop From Windows 7 Laptop?

    Firstly on your windows pc download the latest version of putty client from:

    http://the.earth.li/~sgtatham/putty/.../x86/putty.exe - Putty
    http://the.earth.li/~sgtatham/putty/...6/puttygen.exe - KeyGen

    (The key generator tool isnt a cracking / hacking tool, it generates ssh keys for you)

    Putty doesnt have an installation process, its simply click copy and run, but i would suggest puttying it in C:\Program Files\Putty\Putty.exe and then place a shortcut to it where ever you want just to make life more organised.

    Then download and install Xming from http://heanet.dl.sourceforge.net/pro...0-31-setup.exe. During the installation this will ask you to use Putty, just leave everything as a standard install dont change anything.

    Once the installation is complete, anytime you want to forward x from windows you must have xming running in your notification area on your taskbar, so its probably best to add a shortcut to your startup folder. (Xming not Launch Xming)

    Thats pretty much it for now for the install side on windows.

    Kubuntu PC / Any Linux PC

    Open a Konsole / Terminal

    type:

    apt-get install openssh-server

    confirm the installation and then wait.

    Once the installation is complete, check its running and listening for connections by typing

    netstat -a | grep ssh

    it should return

    tcp 0 0 *:ssh *:* LISTEN

    Windows PC

    Run the puttygen tool that you downloaded with putty, this launches a small window. Click the "Generate" button.

    A status bar will appear with a blank area below it, move your mouse round in that area to allow it to generate your ssh key.

    1. In the key passphrase boxes type a password you want to use and confirm it
    2. Click the "save private key" button, and save the file somewhere, note it is a ppk file (Putty Key)
    3. In the large text box with a load of random characters, copy everything so for example it would look like:

    ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEApAyyS4BvWxABJuE3pPeO3M GE0bXUgIPlVr8vjECInpT6CS2aYjy7ReN5Jx3M= rsa-key-20100425

    This is not my key its just a random one i generated to show you.

    Next if you run putty, and fill in the information:

    1. host name or ip address - Your kubuntu ip address goes here
    2. enter a name for the session in the saved sessions box
    3. press the save button

    This creates a very basic connection, then click open.

    You should then initially see a small black screen and a prompt asking you to accept, just accept the message its only telling you that its the first time you have connected to your kubuntu box.

    In the black window it should now ask you for a username, this is your kubuntu logon name (username), next it will ask you for a password, this is your kubuntu password.

    You should now see a konsole session like what you would see if you were on kubuntu with the prompt.

    Thats basically your ssh setup, now to make it more secure.

    From the prompt if you type: (As your own user NOT root)

    mkdir ~/.ssh

    then

    cd .ssh

    now you need to create the file that holds your authentication string

    so if you type:

    vi authorized_keys

    The screen should go blank and you are now in vi (editor), do everything step by step as its not a straight forward editor unless you have used it before.

    press once on the "a" on your keyboard this puts you in append mode, because you copied the contents of that putty window earlier if you just right click with your mouse anywhere in that terminal window it will paste the long random string.

    Next press esc to go back to command mode, and the type

    :wq!

    The above command writes and quites the file, you should now be back at the command prompt.

    Thats it your ssh server is now secure for you to connect to.

    if you then type exit and the terminal will close, if you re-launch putty again.

    Click on your saved session and click "load", then on the right hand side, expand the ssh menu and click on "Auth" now in the "private key file for authentication" box, click browse and select your saved putty key you saved earlier.

    Now go back to the ssh menu, click on the x11 option and then tick "Enable X11 forwarding".

    Then go back upto the top of the menus and click on session, then save the session again.

    Now each time you want to logon to your kubuntu box click your saved session, and open, type in your username and it will ask you for your passphrase, this is the password you set when you were creating your putty key.

    DONT GIVE OUT YOUR PRIVATE PUTTY KEY TO ANYONE AS IF THEY HAVE YOUR PASSPHRASE THEY WILL BE ABLE TO LOGIN TO YOUR KUBUNTU BOX

    Now you can login securely, if you want to make it even more secure, you can edit the sshd config file on your kubuntu box.

    Kubuntu PC / Any Linux PC

    Open a konsole and then launch your favorite text editor as root to edit /etc/ssh/sshd_con

    Search for the line PubkeyAuthentication and make sure it says PubkeyAuthentication yes

    next find the line PasswordAuthentication and change it to PasswordAuthentication no

    now save the file and return to your konsole prompt

    finally, restart your ssh server daemon by typing sudo service ssh restart, make sure you can still logon via putty.

    Now basically what you have just done is stop all normal access to kubuntu via plain text passwords. The only way you can login remotely is via ssh with your public key.

    Windows PC

    Now providing that xming is running which is should be as you placed it in your startup folder, when ever you open a putty connection to your kubuntu box. In the small terminal window, you can simply type any command to launch an application and anything with a gui in kubuntu will be pushed to your windows pc, no software required.

    So now you can simply type rdesktop {your kubuntu ip} and a remote desktop session will start.

    Same as if you wanted to lauch Konquerer from windows you would just type konquerer and the browser would magically appear

    Job Done, i hope all that makes sense

    #2
    Re: HOW TO - Remote Control Kubuntu Desktop From Windows 7 Laptop?

    Or just downloade Teamviewer from Internet and install it...and the same on the other windows..and then remote with the ID and PASSWORD...

    Simple as that

    Comment

    Working...
    X