In the following tutorial we will explain how to create SSH keys locally from Mac OS so that you can use them on your cloud servers in Clouding. Note that once created you will need to import your SSH keys into the Clouding client panel.
Create SSH key on Mac OS
To generate the keys for SSH access you must run the following in a Terminal. To access the Terminal on Mac OS you must go to the Finder bar and then to Go > Utilities > Terminal:
By default, it uses RSA 3072 bits. To generate keys with higher encryption (e.g. RSA 4096 bits) you can run:
# ssh-keygen -t rsa -b 4096
Once the command is executed, the utility will first prompt for a directory to store the keys. You can leave it empty by directly pressing Enter to use the default path:
Generating public/private rsa key pair. Enter file in which to save the key (/user/.ssh/id_rsa):
Subsequently, it will indicate the possibility of adding a passphrase for the use of the key (optional):
Enter passphrase (empty for no passphrase): Enter same passphrase again:
You can leave it empty if you do not want to enter it when using the key for the connection. Once these actions have been performed, the keys will have been created and you should see an output similar to the following:
Your identification has been saved in /user/.ssh/id_rsa Your public key has been saved in /user/.ssh/id_rsa.pub The key fingerprint is: SHA256:7dRQDxLJcKXoZAVByMHQ0aR5AG2O8qgu7BT83kRgvVc user@equipo The key's randomart image is: +---[RSA 3072]----+ | oB+B*==++ | | . B+.+o+ o | | o =o =Eo . | |. o o o=.. o | | o + o .S o . | | + o . o | |.o . . . | |+.. o | |+o . . | +----[SHA256]-----+
Remember that once you have created the SSH key you can upload the private or public key to your Clouding client panel. If you don't know how to do it, we leave you this tutorial that explains how to create or import your SSH key.
Connecting to the server using SSH keys
To access the Terminal in Mac OS go to the Finder bar and then Go > Utilities > Terminal. You can easily connect by following these steps. The first thing to do is to correctly configure the permissions of the public key (id_rsa.pub).
# chmod 600 llave_ssh.pem
And to connect use this command:
# ssh [usuario]@[IP_pública_del_Servidor] -i llave_ssh.pem
We hope we have helped you with this tutorial. If you have any further questions, please contact us at firstname.lastname@example.org Our Technical Support team will help you with whatever you need! 😉