Securely connecting to SSH without a password

This recipe teaches you how to generate a key pair and set up key-based authentication for SSH sessions, allowing you to secretly connect to a remote system without using a password. Key-based authentication is considered more secure than using a password because a weak password can be easy to guess and a strong password can be easy to forget and more likely to be written down. In either case, an attacker has a fairly good chance of discovering a user's password. With key-based authentication, a user must supply the correct private key file, which is practically impossible to crack or spoof.

Getting ready

This recipe requires a remote system running the OpenSSH server and a local computer with the OpenSSH ...

Get CentOS 7 Server Deployment Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.