Appendix C Setting up SSH keys for password-less server entry
In this appendix, we are going to learn how to use a connection protocol known as Secure Shell (SSH) so that our local machine can connect to a remote computer. In this case, a remote computer can be anything from another computer in your house to a virtual machine that you’re renting from a cloud provider.
SSH gives us command line access to another computer, which will give us the ability to treat another computer’s command line much like we treat our local computer’s command line. We very often use SSH to enter Linux-based operating systems, which means your local computer’s commands might be slightly different than the Linux-based ones. This is especially true for Windows users because Linux and macOS share a lot of commonality in their operating systems.
To connect to a remote computer with SSH, you often need one of the following:
- A valid username and password
- A public SSH key installed
Given the nature of this appendix, we’re going to prepare for using SSH keys as they can allow for password-less entry to a remote computer.
SSH keys are comprised of two components:
- Public key—A shareable key that helps verify our identity
- Private key— A secret, nonsharable key that verifies our public key is, in fact, ours