Jump to content

Been reading up on the use and creation of public and private keys on a windows machine


G+_Rud Dog
 Share

Recommended Posts

Been reading up on the use and creation of public and private keys on a windows machine. So far it appears and I was not aware of this fact, you can use puttygen to create your keys.

The private key is stored on your computer and can have a passphrase to protect it, not sure how this does that but better safe ...etc.

Once use of the keys is for logging (ssh) into a lets say unix machine without having to provide the password. In this case you store the public key on the unix machine in a certain location. Still working on the basics of where and how to store the public key.

Also there was a hint of another use which I am still trying to figure out and that is encrypting communications between friends and family.

Any input on tutorials for this project that will steer me in the correct and safe way to do this is appreciated.

Link to comment
Share on other sites

Hmm followed the tutorial to the Tee but got :

Server refused out keyenter password.

Now guess i need tutorial on how to back out and start over not sure if it is as simple as deleted the public key on my unix box and deleted the pub and private key on my windows machine?

Link to comment
Share on other sites

Thinking you are absolutely correct what I find odd is while seeing the path to the key and running the ssh connection it says in the newly opened Terminal window; Using username "root" which is fine that option to have it use that username was configured in putty. But it goes on to say:

Server refused out key.

Then requests:

root@192.x.x.x's password:

of course when entered it works fine.

The point making here is the path when I loaded and ran ssh from putty was visible to my key it is subsequent uses that I find the path not in the entry box.

Looking for information on line as to what happens if I delete the private and public key from my windows machine and the linux machine and start over?

Link to comment
Share on other sites

Ok, so a couple of things. You do need to save the Putty session as a profile so that every time you use that Profile the key will be used. Putty does NOT save profiles automatically. You have to specifically save the profile manually every time you make any change.

 

If the public key is not installed in the unix systems .ssh/authorized_keys file then you will be prompted for a password instead. If the unix system is properly configured to disallow password login, then you will be denied connection.

 

The basics should be: create the private and public key on your client computer. Copy the public key to the authorized_keys file on the unix machine. Make sure the permissions are set accordingly on unix:

 

chmod 700 .ssh

chmod 600 .ssh/authorized_keys

 

Hope that helps

Link to comment
Share on other sites

Thanks Steve, always great to hear from those that have gone before me on projects of this sort.

After reading your instructions it appears everything is in order the profile was saved both for connection, username and private key path using browse key.

The only thing which does not match based on reading the detailed instructions is the first time I browse to set the private key it shows up left of the browse key when saved. Now If I go back after saving the path it is still visible, the path to my private key. If I close out putty and relaunch it drill down to the location where I set the path with the browse key it no longer shows up, even though I saved it after the fact.

This is the only step which differs from the instructions followed oh and changing the 1024 to 4096 as mentioned in my previous responses. If these 2 steps could cause the problem then it is solved.

Otherwise have to wonder what happens if I delete the public key on my linux box and delete the private key from my Windows 8 PC?  If is ok can try the whole process over again and more closely document my steps.

Link to comment
Share on other sites

Turns out my linux requires a different location for the key. Now what I am seeing each ssh connection is requesting the paraphrase once entered the login successfully finishes without the username and password.

Why is it asking for the paraphrase for each ssh login?

Link to comment
Share on other sites

Your private key is encrypted with a password. PuTTY needs that in order to access the private key for use. The utility Pageant (same author, download page) will cache the authenticated password to avoid needing it every time, or you can choose not to password protect your private key.

 

I choose the latter and protect my laptop accordingly.

Link to comment
Share on other sites

 Share

×
×
  • Create New...