← All articles
Webhostone: connect to the server with an SSH key (WSL/Mac/Linux)
How to get your public SSH key into the authorized_keys file at Webhostone and log in to the server with your SSH key.
To log in to Webhostone with an SSH key, you have to add your public key to the authorized_keys file. Unfortunately, the guide at Webhostone is incomplete and leaves out the last step: how to get your public key into this file.
An easy way is to first generate a key, if you don’t have one yet:
ssh-keygen -P password
You then save it wherever you like; the default is ~/.ssh/id_rsa.
After saving, you only have to copy this key to the server:
cat ~/.ssh/id_rsa.pub | ssh yourUsername@servername.com 'cat >> ~/.ssh/authorized_keys'
Done!