You are here

Using PuttyGen to create SSH keys - update needed

8 posts / 0 new
Last post
K6CCC
K6CCC's picture
Using PuttyGen to create SSH keys - update needed
In the help, there is a nice discussion about using PuttyGen to create SSH keys for use with AREDN nodes.
https://www.arednmesh.org/content/how-use-puttygen-make-ssh-keys-and-use...

Unfortunately, that is based on ancient versions of PuttyGen.  The screen captures are so outdated, that I can't manage to create a key pair that will work with AREDN nodes.  The options recommended simply don't exist.

Any chance of getting that page updated with screen captures from a reasonably current version of PuttyGen?
Or at the very least can someone walk me through what the settings need to be?


 
WU2S
WU2S's picture
Docs update
Steve AB7PA just updated the AREDN docs to show how to use the current version of the PuttyGen program. The Docs will be updated for public access overnight.
 
K6CCC
K6CCC's picture
Thanks much!
Thank you very much.
K6CCC
K6CCC's picture
Node not accepting the file.

I see the docs have been updated.  Tried several times with PuttyGen version 0.76 (current version).  PuttyGen creates the files fine, but every AREDN node I attempted to upload the .pub file results in:

Error: file does not appear to be an ssh key file
Authorized keys not changed.
Failed to restart all services, please reboot this node.
Info: key file sanitized.

Rebooting the node does not help.  Tried on a hAP, Rocket M3, GL iNet USB150, and Mikrotik RB-LHG-2nD-XL.
All have nightly 847, and all gave the same result.  All done from a Windows 10 desktop.

AB7PA
Key file probably contains unwanted characters

Jim, there's a good chance that your key file contains unwanted line breaks or other characters.  I'm going to update the instructions to include WU2S Randy's previous way to remove those unwanted characters.  Windows always makes things more complicated than they need to be IMHO.  On MacOS, Linux, or Raspberry Pi it's fairly simple and straightforward using ssh-keygen.

K6CCC
K6CCC's picture
Just as a followup to that.

Just as a followup to that. After not getting Windows to create the file, I used one of my RasPi-4s to generate a key pair, and the AREDN nodes accepted the file fine, but I could not get Windows to accept the file.  I'm trying to use the SSH key file with a Windows command file that calls a bunch of scp commands.  No matter what I did, scp would not accept the permissions of the key file - saying that the permissions were too loose.  I did not try using the key file with Putty.
This had worked perfectly in the past, but as a result of a computer upgrade, lost the private key file, so trying to create a new key file pair.  Tearing my hair out.
 

AB7PA
online docs should be updated shortly

... well, if you're like me... hair is at a premium, so don't pull too hard!  The latest instructions are in the GitHub approval queue tonight, so hopefully the online instructions will be approved and updated shortly. Is it possible that your Windows scp program is looking for its keys in a different location than where you created them with puttygen.  

K6CCC
K6CCC's picture
File

Is it possible that your Windows scp program is looking for its keys in a different location than where you created them with puttygen.  


Good thought, but no.  As you can see, the command file specifies where to look for the ident file, and the file is in the correct location.  And it worked until I inadvertently killed the .ppk file.

h:
cd \My Documents\AREDN\Layouts and Icons
scp -P 2222 -i ..\ssh\k6ccc-jim.ppk K6CCC_Green.css root@10.115.242.97:/www
scp -P 2222 -i ..\ssh\k6ccc-jim.ppk connected.png root@10.115.242.97:/www
scp -P 2222 -i ..\ssh\k6ccc-jim.ppk disconnected.png root@10.115.242.97:/www


Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer