5.6 SSH key management tool

This example application performs user keys and host keys related operations. It relies on the assh_key_create, asshh_key_load_file, assh_key_validate and asshh_key_save_file functions provided by the library.

Here is how it can be invoked in order to generate a new user key:

$ examples/keygen create -t ssh-rsa -o ~/.ssh/id_rsa
Generating key...
Saving key in pem_pv format...
Output key passphrase:

The previous command only generates and stores the private key. The associated public key can be extracted with an other invocation:

$ examples/keygen convert -f openssh_pub -i ~/.ssh/id_rsa -o ~/.ssh/id_rsa.pub
Loading key...
Input key passphrase:
Key type: ssh-rsa (private)
Saving key in openssh_pub format...
Valid XHTML 1.0 StrictGenerated by diaxen on Sun Oct 25 23:30:45 2020 using MkDoc