Create an SSH key pair
Sometimes you may need to connect to your servers using an SSH client to run terminal commands on your remote server. An SSH public key is used for secure authentication when you use an SSH client to connect to a server managed by Devopness. When you connect, you must provide the private key that matches the public key added to the remote server. Create an SSH private/public key pair to securely authenticate your server access on the new device. Several tools exist to generate SSH public/private key pairs. The following steps show how to generate an SSH key pair on UNIX and UNIX-like platforms.
- On your local machine, in a terminal window, run the command below, replacing
<your email address>with a valid email addressssh-keygen -t rsa -b 4096 -C "<your email address>"This creates a new SSH key, using the provided email as a label.
- Follow the prompts to complete the creation of the new SSH Key pair
There should be 2 new files inside
$USER/.sshdirectory,id_rsa(private key) andid_rsa.pub(public key) - To add the public key (
id_rsa.pub) to Devopness, see Add ssh key
Add an SSH key
Sometimes you and your team members need to connect to your servers to run commands from the terminal. Add SSH keys to environment servers to ensure secure server access by only the authorized SSH keys.
Deploy SSH Key
Deploy your SSH Keys to each of the servers you want to give access to using those keys.