Introduction
Using SSH keys for authentication offers significant security advantages over traditional password-based logins. SSH keys are more secure, less prone to brute-force attacks, and eliminate the need for users to remember complex passwords. By leveraging LDAP for user management, you can centralize user authentication and simplify access control across multiple systems.
Steps to Generate and Use SSH Keys for LDAP Users
Generate SSH Key Pair
On a Unix-based System (Linux/macOS):
- Open a terminal
- Generate a new SSH key pair:
ssh-keygen -t rsa -b 2048
- Follow the prompts to save the key (default location is
~/.ssh/id_rsa
). You can optionally set a passphrase.
On Windows using PuTTYgen:
- Download and open PuTTYgen.
- Click on "Generate" and move your mouse around to create randomness.
- Save the private key (e.g.,
id_rsa.ppk
) and the public key (e.g.,id_rsa.pub
).
Add the public keys to LDAP
Using CLI
|
...
- Start by connecting to your Remote Desktop with the username assigned to your ldap tenancy.
- Once you're in, launch Firefox and visit the IP of your LDAP server.
- Once you're in the LDAP, You can then click on the user and insert SSH keys
Enable SSH authentication for already provisioned instances:
Go to the Instance → Actions → Run workflow → enable_ssh_authentication
Logging in with SSH Keys
Login Using SSH Keys (Default Path):
...