To set up key-based login for your AlmaLinux server, follow these steps:
- Generate SSH Key Pair with PuTTYgen:
- Open PuTTYgen on your Windows PC.
- Select “RSA” as the key type (or “ECDSA” for increased security).
- Click “Generate” and move your mouse within the blank area to generate randomness.
- Once generated, save the private key by clicking “Save private key.” You can name it something like
alma_private_key.ppk
. - Copy the public key displayed at the top. It should start with “ssh-rsa” if you used RSA.
- Add the Public Key to Your AlmaLinux Server:
- Connect to your server using your existing password.
- Run the following commands to set up the
.ssh
directory and authorized key file:bash