How to generate SSH keys on Windows
https://www.zyxware.com/sites/default/files/styles/user_image/public/default_images/index.png?itok=2YmREnrP
BY sandeep.sasikumar
8 years ago
Technical-Solution
0 comments comment

Generating SSH keys and using them for connecting to SSH servers is a straightforward process on Linux. But for Windows users, Windows does not provide any support for the SSH protocol by default. There is no SSH client that comes by default on Windows. Let alone generating keys.

Let us see how easily we do it on Linux:

Key generation in LINUX

You can generate the keys using the ssh-keygen command on the Linux Teminal:

user@host:~$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/user/.ssh/id_rsa): Just press ENTER here
Enter passphrase (empty for no passphrase): Enter a passphrase
Enter same passphrase again: Enter the same passphrase 
Your identification has been saved in /home/user/.ssh/id_rsa.
Your public key has been saved in /home/user/.ssh/id_rsa.pub.
The key fingerprint is:
92:3d:32:92:f0:cc:2e:5d:1e:50:
d8:9e:1c:9a:4b:ae user@host
The key's randomart image is:
+--[ RSA 2048]----+
| 	o.        |
|	..o       |
|  . .= o         |
|   =+o+o         |
|   o*.B S        |
|   oo+ = .       |
|  ..o .      	  |
|  E.             |
|                 |
+-----------------+
user@host:~$

By now, you should have the files id_rsa and id_rsa.pub in the .ssh folder in your home directory. This is how you generate the key pair in linux. The file id_rsa.pub is your public key and id_rsa is your private key. In the public key authentication process with the developed public key you will be able to login to the server. There will be a passwordless authentication process.

Anyway, to save those still using Windows, we have Putty ( http://www.chiark.greenend.org.uk/~sgtatham/putty/ ), the free SSH terminal client, for your connecting needs, and puttygen, for your key generation needs.

Key generation in Windows

The public/private key generation in windows is made possible by a tool called puttygen. With which you can develop the key pair which is required for public key authentication. Here several things are to be noted to avoid problems or errors. The main problem that I faced while trying to login from a windows machine to the server were the "keys problem". I have tried a whole lot of things and generated a several set keys as each time I tried to login it shows a different set of errors. In the initial case the error was "Unable to process the key" and later I realised that the public key generated should be converted to a one-line format. After fixing this error I also tried to have a go. But had come up with a new error message saying that the “Server refused our key”, and later I started to compare the keys generated in a linux machine and a windows machine. And the real solution to the problem has been obtained.

The RSA keys generated in linux machines are of 2048 bits default value and minimum size is 768 bits, whereas the keys generated in windows where 1024 bits. In puttygen there was an option to select the size of the key and it was set as default 1024 bits. In the next problem solving step I changed the default key size value from 1024 to 2048 bits. And thus generated a public/private key pair of 2048 bits size. This time the problem was solved. By setting the auto login user-name, I could login to the system with the public key, no password authentication step was involved.


RELATED ARTICLE

/themes/custom/zyxpro_light/images/placeholder.png
close

on 04th April 2007 / by webmaster
Linux is the epitome of the FLOSS model. Technical Solution Linux installation Leave a reply Your email address will not be published. Required fields are marked * Dewey J. Corl (not verified) access_time 01 Dec 2020 - 04:57 Linux is not ready for the general public! (I am a Ubuntu user). For proof, 1. try to simply print labels on a Dymo label printer. It takes a LOT of work to get to the ease of label printing already available in Windows and Mac. 2. try syncing a modern Palm based PDA. Yes, jpilot and others will sync the main data, but pictures and midi files do not get transferred without a lot of extra setup. These are examples of applications that are not ready for the general public. Since an operating system only supports applications, Linux is not ready to be a common desktop for the general public. While we are waiting for the applications to catch up, keep up the good work!! Anoop John (not verified) access_time 01 Dec 2020 - 04:57 Dewey Yes you may be right. But these are not applications that a common man would use. A common man would use one of these applications - Internet browser, Chat Client, Email Client, Document Writer, Presentation Creator, Spreadsheet Editor, Movie Viewer, Music Player, CD/DVD Writer. Both examples you cited are more specific applications that only a small percentage of the whole population uses. It will take time before those hardware vendors identify the need from their perspective to address the Linux community. Krishnadas (not verified) access_time 01 Dec 2020 - 04:57 Dear Mr Anoop, Thank you very much for the free installation of LINUX done in my PC. I am getting immersed in the LINUX and seeing the versatility. To my surprise, I am able to read one of my old backup CD(wherein lot of my valuable file exist) done in DIRECT CD wizard (a custom cd writing software of Easy Cd creator in WIN98) which could not be read in XP. Installation of old version of easycd creator/direct cd program was not possible in XP. I thought that possible i lost all data. Very pleasant start! Srikanth N. S. (not verified) access_time 01 Dec 2020 - 04:57 Hi Anoop, My friend is thrilled with Ubuntu. One of his grouses with windows was that after OS installation, everything else is to be installed separately which is a real headache. WHereas if u install Linux, everything is installed as a package and he is thrilled to bits! Let linux installation spread in Trivandrum and your service in this direction is highly appreciated. Kepp up the good work Regards. PDA Freak (not verified) access_time 01 Dec 2020 - 04:57 Is it possible to install linux on a packardbell notebook ? Pagination Current page 1 Page 2 Next page Next › Last page Last » Add new comment
Leave a reply
Your email address will not be published. Required fields are marked *

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type='1 A I'> <li> <dl> <dt> <dd> <h2 id='jump-*'> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
The content of this field is kept private and will not be shown publicly.
CAPTCHA This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.