key based ssh authentication (Cygwin)

By | January 16, 2014

We all know now that Once installed, Cygwin opportune us to treat the local windows machine Linux Way (http://linuxmantra.com/2014/01/cygwin-openssh-mintty-ssh-client.html) . And a step forward is then to apply the very known public/Private key authentication on Cygwin in exact Linux-to-Linux way (explained @ http://linuxmantra.com/2009/09/ssh-using-privatepublic-key.html). So how actually is Cygwin treating my local machine…
Now Using Cygwin-Openssh combination, I intended to login to my Linux VM effortlessly each time. So I needed two things Set Key Based Authentication and secondly set an alias. This is a cake walk job – 1. generate key on Cygwin, 2. copy public key to my VM & 3. Set an alias;            So Lets get back to Cygwin:

We created Private/Public Key pair using Openssh (ssh-keygen) on Cygwin and it stored the private key on my windows machine: /home/user/.ssh/id_rsa and I opted for no Passphrase. The Perm for .ssh must be 700 and for private key file (id_rsa here) must be 600 strictly.

Sent the public key on the remote machine, the password required in the screen below is for the remote machine. (If you want it be done manually then copy and paste the key to remote machine:/home/user/.ssh/authorized_keys. Remember it should again have the perm only 600.Set the Alias for remote machine SSH (Simplicity) 🙂

Lets Login short & simple: …and it worked!

One last thing…Is this key based authentication working via command promt…??? O yes!

This completes our to-do on Cygwin (just another SSH Utility)!

 

Share itShare on FacebookEmail this to someoneTweet about this on TwitterShare on Google+Share on LinkedInPrint this page
Category: SSH

Leave a Reply

Your email address will not be published. Required fields are marked *

Current month ye@r day *