From the course: Complete Guide to Linux Security: Protecting Your Linux Server Environment

Unlock this course with a free trial

Join today to access over 24,300 courses taught by industry experts.

Using keys to connect via SSH

Using keys to connect via SSH

- In this lab, we'll show how to create cryptographic key pairs for making connections via SSH. To SSH into a system using a key, you need to have a key pair. The first key is called the private key, and it resides on the computer where the key pair is built, usually the person's workstation. The second key is called a public key, and it resides at the SSH server or whatever remote system that will be connected to. When you attempt to SSH into the remote system, that system presents its public key. If it matches the private key stored at the local computer, then the connection will be allowed. So we're going to be working in Lab 26, and you can see here we have the lab document, Using Keys to Connect via SSH, so feel free to follow along with that, and I'm going to jump over to my Debian client system. So first, we're going to create a strong RSA key pair, and RSA is the encryption algorithm that's used by SSH by default. You can use other ones as well. To create a key pair, we'll use…

Contents