Ubiquiti Ssh Authorized_keys Generated
Better secure your Ubiquiti EdgeRouter X using SSH login certificates! Open PuTTYGen.exe and click on Generate to create the public and private key pair. Click on “Save public key” naming it edgerouter.pub then click on “Save private key” naming it edgerouter-pri.ppk. Tectia Server supports also user public keys generated with OpenSSH. The OpenSSH keys can be configured the same way as described above for keys generated with Tectia Client. Alternatively, the OpenSSH-style authorized keys file can be specified in the ssh-server-config.xml file by using the openssh-authorized-keys-file attribute.
If the key generation was successful, you should be offered with the following options. It is a good practice because if your key is compromised without your knowledge, the expiry date will limit the lifetime of your public and private keys. Click on 'Finish' to finish the processNow we move forward with setting an expiry date on the keys. Warning: Never reuse your passwordsChoose a brand-new passphrase that you have never used on any other service (e.g. Gmail) before.
Lets say you have a private/public key pair that you use to login to your server via SSH and you lose the public key, either it was deleted or corrupt and you don’t want to have to regenerate a new pair what options do you have? In this post I will demonstrate how to regenerate a public key from the corresponding private key that you still have.
Generate public key and store into a file
It is a simple one liner command to generate a public key from a private key, so lets say our private key is named ‘user@myserver.key’ and we want to generate the public key and name it ‘authorized_keys’. Below is the command to do this.