Looking to get a better understanding of how to manage SSH public keys? You'll find this guide helpful!
In this article, we'll discuss what SSH keys are, why they are important and how to add an SSH public key to a remote server. Our focus is to make all aspects of the development process as smooth and easy as possible..
Let’s get started!
What are SSH Public Keys?
SSH public keys are used to authenticate the identity of a user or process that wants to access a remote system using the SSH protocol. The user encrypts with a private key, and the remote system decrypts and verifies with the public key.
Why are SSH Public Keys Important?
Public keys play an important role in ensuring that the remote server can be accessed securely. Because they are used to encrypt messages, public keys prevent hackers and other malicious actors from intercepting data being transferred between the user and the remote server. In addition, SSH public keys can be used to access servers without having to type in a password every time, which is more secure than using passwords.
How Do I Find My SSH Public Key?
Your Codio SSH public key can be easily accessed from within the Codio project. To find the key, open a terminal window and navigate to the ~/. ssh folder. Inside this folder, you will find your SSH public key stored in an id_rsa file.
If you're using Mac or Linux, you can simply copy your SSH public key to the clipboard using the command pbcopy < ~/. ssh/id_rsa. pub
.
If you're on Windows, use Putty to obtain your SSH public key.
Once you have obtained your SSH public key, you can add it to any remote server where SSH access is enabled.
How to Add a Public Key to Remote ServerCodio has two main features that require access to remote servers:
- SSH Terminal - you can create and manage any number of remote servers directly from Codio. There's a blog post on this and you can also read the docs.
- Deploying via SFTP and RSYNC
Most developers prefer to use SSH to access remote servers, as it avoids password entry completely and is more secure.
Codio generates public keys that can be found in the Codio > Account menu. One way of getting your Codio public key onto the remote server is to copy it and then SSH into your remote server and then add it to your ~/.ssh/authorized_keys file. However, this is an unnecessary chore. We've made it so you can now upload your keys in 2 ways.
Locating Your SSH Key From Your Account dialog
The screenshot below shows how to press the Upload Public Key button. You will be asked to enter your access details and that's it. You can access this dialog via the Codio > Account menu item.
From the SSH Connection Manager
You can SSH into any remote server right from within Codio. In the connections listing, there's a button you can press that does the same thing as above.
Learn More About Codio Today
Codio is a powerful development platform that helps you quickly create and deploy applications. If you want to learn more about what it can do, take a look at our blog or check out the Quickstart Guide.
Get Started Today - schedule a demo or create a free instructor account.