SSH : Key-Pair Authentication2026/04/09 |
|
We will generate an SSH key pair and configure the system to allow login using authentication with that key pair. |
|
| [1] |
To create an SSH key pair, log in via SSH as the local user for whom you want to create the key pair, and then proceed. However, for the [root] user account, a key pair without a passphrase is generated by default. |
|
| [2] | If you use the default key pair with the [root] user account, you can enable authentication with the key pair by transferring [id_rsa] to the client computer. |
|
| [3] | Note that enabling password authentication makes your system more vulnerable to attacks.
Therefore, if you are using SSH key pair authentication for the [root] user account, you should change it to [PermitRootLogin prohibit-password] as shown in [1]. If you also want to prohibit password authentication for regular local users, you should change it to [PasswordAuthentication no], [KbdInteractiveAuthentication no] as shown in [2]. |
|
| Sponsored Link |
|
|