Solved [Solved] How do I install a SSH key generated by puttygen?

Hello guys. I didn't know where to write this topic so I just do it here, if it's wrong selection sorry about that.

I'm a 17 years old ICT student. I have generate my private key with puttygen and I would love to secure my server. But on the internet it was really hard to find any tutorial about it. So my question is, how can I install my private key on freebsd FreeBSD?

Thank you, greetings.
 
Re: How do I install a ssh private key generated by puttygen

Just open the key in PuTTYgen and copy/paste the "public key for pasting into OpenSSH authorized_keys file" into ~/.ssh/authorized_keys. Create it if it doesn't exist. Make sure everything is pasted as one line.
 
Re: How do I install a ssh private key generated by puttygen

You don't install the private key anywhere but keep it very secure with a password set on the machine where you generated it. What you do install is the matching public key to ~/.ssh/authorized_keys on the server. Make sure you have the key in the right format, if I remember right you have to copy the key from PuTTygen's window and paste it then on the terminal window while you have the ~/.ssh/authorized_keys file open in an editor.
 
Re: How do I install a ssh private key generated by puttygen

That seems to be easy, but.. This is my public key for pasting into OpenSSH authorized_keys file:

Code:
PuTTY-User-Key-File-2: ssh-rsa
Encryption: none
Comment: rsa-key-20140115
Public-Lines: 6
AAAAB3NzaC1yc2EAAAABJQAAAQEAjIMH4zY7tu+4M4BMR1ZqEFm7LH2Vm/gUhInG
ALp4rn8ddR7skDI9mrkRojcKyzrzEkDvQVPvqnQvlHUIOmy60ZcD83QHgsF8jV0t
ANq3sp39q52vL31s9nV/t4Wx3a+k0F59p85f9IGvoLuvXr448aSjmIJzGV+o4JIx
ZMTtQtbqhbllEAbp/pt3ztTakwGudFyqcOiSDhQVdbPIJYeOa5KSMlwWvCo9h/x7
//GjmLAnBiX8SavRcnI4gk5pJ5IGYhwPs8SGS5BTUw1EqPnH5Z5A4faM+NzQ7m+P
Uy726Frn3ogQEOEp3QeQGQlSZLjCEkKwV2OMHJ4347q5ZlGNnw==
Private-Lines: 14
AAABAAeYYUqNT1X/Hras/TRJ3Dg8M6GKP3A27Fow9fIzl9IUtXvz1W+UA1R4tNhW
AJVdIeVPnjrh8Ud75uVuHB7VceHQz8f4bxvTG31DTopsr/vRME53OebkL2dEnx6t
R+J4MmwgyIWcc+Oz+6fSyzWNveOMW9668Xb+QHrXeEqi3GR6PVy7YikLmL+lPsaZ
bI69lh9i1Ej2zbK5cS6wdJ9ORMqpC0DTI/BeYyHUp4no/oa/HRwECXDiOPLmOEHX
+lUBB5uzRE/Xx9phhicXbcO5gv3b+Q8BpB0gp6rI2VIvq9yOMh9p1X7OX3jUwxsd
LtSYRu5zTNYurrH5jE1NKJG5H60AAACBAL3xRcM6eVaMNrJ/wqZz9cmQgpdo2e0x
YP869rm/64JMybz3FlzImmnESNGcgC5EC8tdqWdd7O2khjQNFw3qkG0EVHZe4an8
+8T+mSYdQCVJEBWHMEiPGQntXCX50GYG3CQ2TiP+ke/usYvG0tpnE3Oq6depxqlm
gG6e4o9HubifAAAAgQC9YOkJ3jcJmPO79PvbzliLnzW7wjjHckxoWvyg4nQTeZGF
DAOhFL2p0dWO7BsQl9TBIjHmQ2XGQEjzsxvEGG6MnVMpj8rrBohcgUKv5tGrRCir
xSfoTuepKY+06OylcTgkYxP+aGVTsvXq3JqVoKQuLAPLMz1C2ZUlrsS7lrcLAQAA
AIB+5lcQvpf+9hS7G0KNhahN7E8rKynffcsa8OxeHZBQT3fr2IvDeJvSqN0bfvbv
WKbGEnhSgbJINKBrs1ZRUM5ueTdYYjHacZLC2Gfw9mqcDqVix7oa5/ZTyo8ZNv7D
n25FayIJDLeIQbT1Ulv9DSnVen6eegywZcf9buJx4zGkZQ==
Private-MAC: 27dacfaef0f4b9eb4d06b11cdb4a31b28cd6e816

I put it into /.ssh/authorized_keys. And now I generate a .ppk file, and sorry, but what is my paraphase [ pass phrase? -- Mod. ] to connect with server?
 
Re: How do I install a ssh private key generated by puttygen

I don't know where you got that from but that's both your private and public key. This is not what's shown in the PuTTYgen window.
 
Re: How do I install a ssh private key generated by puttygen

That's the wrong type of public key, you need the key in the OpenSSH format that has the key as a one long line. Select the text in the window of PuTTYgen and copy it to place the key in the clipboard. Also you just copy/pasted your private key for everyone to see. Scratch that key and generate a new one. You won't have a passphrase for login when the key authentication is working, only the password that you have set for the private key will be asked by PuTTY.
 
Re: How do I install a ssh private key generated by puttygen

Thank you guys! You really helped me. Both of you! @kpa, you are right, I did it wrong but now I know how to do that.
 
Last edited by a moderator:
Back
Top