SSH access using private/public key pair

From The Kinguard Project Wiki
Jump to: navigation, search

< Tutorials and How-tos


After enabling SSH to your unit you can copy a public key in order to use private/public key authentication.

If you already have a key that you want to use, skip the first step.

1. Generate the key pair

ssh-keygen -f kgp_rsa

Now you have two files, kgp_rsa which is your private key file and kgp_rsa.pub which is the public key file.

2. Copy the public key file to the target, using the password provided in the email when enabling ssh

ssh-copy-id -i kgp_rsa.pub root@your-target-hostname-or-ip


Note that for OPI you can use your opi-name, or if you are on the same local network and your router have problems with accessing local resources on portforwards, you can use root@local.youropiname.op-i.me