Generating an SSH Key to use instead of passwords is the secure and preferred way in today’s era. Passwords can be cracked, guessed, stolen, hacked; you name it. With encryption, having no password at all is doable, but even if its password gets stolen/hacked somehow - The hacker won’t have your private key to be able to authenticate as you.
This page will offer a few ways to generate an elliptical curve SSH key and explain how to use it. We choose the elliptical curve for many reasons, The foremost benefit of ECC is that it's simply stronger than RSA for key sizes in use today. The typical ECC key size of 256 bits is equivalent to a 3072-bit RSA key and 10,000 times stronger than a 2048-bit RSA key! To stay ahead of an attacker's computing power, RSA keys must get longer.
Public keys are easily transferable rather than pasting 30 miles long RSA public keys, we can simply get by with a 1 liner.
Generating an SSH (Secure Shell) Key:
In Windows: Open Secure PowerShell
In Mac/Linux: Open a terminal
Generate your Key (Press Enter to not use a password since you're authenticating securely):
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "[email protected]"
Add to SSH agent so you can easily ssh user@server to log in
eval "$(ssh-agent -s)" && ssh-add
Secure your private key from other users/applications on the system, so only YOU can access it.
chmod 600 ~/.ssh/id_ed25519
Suggestion: Leave the password blank, as in the future you may want to run remote commands without being prompted for a password.
All the end website/server needs are your public key. This is the public hash that goes out to the world. For example, Shane from Shells.com’s public key is:
The private key is stored in ~/.ssh/id_ed25519 and ONLY YOU should ever have access to that file.
How can I use it?
Use it where you can, learn, and go from there. Let's add it to our server.
ssh-copy-id -i ~/.ssh/id_ed25519 user@host
This logs into the server host, and copies keys to the server, and configures them to grant access by adding them to the authorized_keys file. The copying may ask for a password or other authentication for the server.
Once this command has been issued, you can now:
ssh user@host
Adding your key to Shells is simple!
When installing a Shell on your account, be sure to always select the key of your choice. By default, Shells does not install an operating system with passwords, nor prompt you for one. This is for ease of use and ease of access. However, this means that you can’t SSH into your server as soon as it boots.
When installing an OS, install with your key:
After installing, your Administration tab should look like this:
By default, Shells uses a shared IP address system to hide user activity, as in we nor any spying eyes can know which data is whose. This is for obscurity and security reasons for our customers. If you’d like a dedicated IP address, feel free to purchase one for $1
The public key from your Shells Keys is then installed to ~/username/.ssh/authorized_keys
If using the default IP address on your shell be sure to specify -p <port number> given to you in Administration.
ssh [email protected] -p 22
And you will log in with admin privileges. To check your privileges, it should list sudo
groups