Archive

Posts Tagged ‘openssh’

How to: Make a password less SSH Login

First  you will have to generate key on local machine.

For that type in the following command in a terminal. Here we are using RSA encryption.

ssh-keygen -t rsa

It will ask you for a password but you can leave it blank.

Note you could also pick -t dsa if you prefer DSA encryption.

Ensure that the remote server has a .ssh directory

Make sure the server your connecting to has a .ssh directory in your home directory. If it doesn’t exist you can run the ssh-keygen command above, and it will create one with the correct permissions.



Copy your local public key to the remote server

If your remote server doesn’t have a file called ~/.ssh/authorized_keys2 then we can create it. If that file already exists, you need to append to it instead of overwriting it, which the command below would do:

scp ~/.ssh/id_rsa.pub remote.server.com:.ssh/authorized_keys2

Now ssh to the remote server

Now you can ssh to the remote server without entering your password.

Security

Now keep in mind that if someone need to login to the remote server, all s/he need is the file on your local machine ~/.ssh/id_rsa, so make sure it is secure.

Using SSH how to start an application with UI Window in Windows (windows as SSH server)

I am writing this post as I spend my one whole day searching for this. I even logged into the official IRC channels for VBox, VMWare, Linux, Windows(unofficial IRC Channel), Ubutnu etc etc. But still got no help for solving my question. Of course I got help, but not for this.

My question was ” How to start an application with windows if I connect SSH from Linux to Windows”? What I tried was:

:~$ ssh admin@<ipaddress>

:~$<password for admin>

C:\Documents and Settings\Plato>notepad.exe

Now when i do this, notepad.exe started working in the Server XP machine. But there was no visible window for the process. I understood the notepad.exe process is starting when I give the command in Linux, by looking in the process explorer. Now after 1 whole day, I tried using the help of DOS commands. And thus I ended up trying the start command. that was it, when I give start notepad.exein the SSh prompt in linux, the UI was visible.ie when i give the command like

:~$ ssh admin@<ipaddress>

:~$<password for admin>

C:\Documents and Settings\Plato>start notepad.exe

The notepad.exe window just shows up in windows Machine..

If you know any other method for doing this, pls share it using the comments section.