Knowledge Base

How do I log in using an SSH key?

How do I log in using an SSH key?

On your local machine, generate an SSH key pair: ```bash ssh-keygen -t rsa -b 4096 ``` This creates id_rsa (private key) and id_rsa.pub (public key). Copy the contents of id_rsa.pub into /root/.ssh/authorized_keys on the server (you can use ssh-copy-id or upload it via SFTP). Connect to the server locally using: ```bash ssh -i ~/.ssh/id_rsa root@ ``` You will now be able to log in without entering a password.

Can't find the information you are looking for?

Create a Support Ticket
Did you find it useful?

1 times viewed | 0 people fount it helpful

3826704865 +38267054865 +38267054865 Top