Using SSH keys is a secure and reliable way to connect to your VPS over SSH without a password. In this guide, you’ll see how to create SSH keys on Linux, and macOS, and how to use them to connect.

ssh-keygen -t ed25519~/.ssh:id_ed25519 (private key)id_ed25519.pub (public key)Notes:
-t ed25519: Sets the key type. ed25519 is the most secure modern choice.-f /path/id_ed25519: (optional) changes the save location.-i -f: (optional) converts an existing key to another format (e.g., SSH2 ➝ OpenSSH).You’ll also see a fingerprint and a randomart image, useful for verifying the key on remote servers.
There are two methods:
ssh user@ipmkdir ~/.ssh && touch ~/.ssh/authorized_keysexitssh-copy-id user@ip or sudo ssh-copy-id -i ~/.ssh/id_ed25519.pub user@ip-p 1234 if you use a custom port.
If you see no identities found, make sure the key is in the correct folder or specify the path with -i.
For example:
sudo ssh-copy-id -i ~/.ssh/id_rsa.pub user@123.123.123.123
sudo ssh-copy-id -i /etc/keys/id_rsa.pub user@123.123.123.123
sudo ssh-copy-id -i /home/root/id_rsa.pub user@123.123.123.123
mkdir ~/.ssh && touch ~/.ssh/authorized_keysid_ed25519.pub) and copy it.nano ~/.ssh/authorized_keysFor maximum security, it’s recommended to disable password-based SSH logins:
sudo nano /etc/ssh/sshd_configPasswordAuthentication nosudo systemctl restart sshsudo systemctl restart sshdContact our experts, they will be happy to help!
Contact us