Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering CentOS 7 Linux Server

You're reading from   Mastering CentOS 7 Linux Server

Arrow left icon
Product type Paperback
Published in Jan 2016
Publisher Packt
ISBN-13 9781785282393
Length 298 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Authors (2):
Arrow left icon
Mohamed Alibi Mohamed Alibi
Author Profile Icon Mohamed Alibi
Mohamed Alibi
BHASKARJYOTI ROY BHASKARJYOTI ROY
Author Profile Icon BHASKARJYOTI ROY
BHASKARJYOTI ROY
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Advanced User Management 2. Security FREE CHAPTER 3. Linux for Different Purposes 4. Mail Server with Postfix 5. Monitoring and Logging 6. Virtualization 7. Cloud Computing 8. Configuration Management 9. Some Additional Tricks and Tools Index

SSH key-based authentication


As we have noticed by using SSH every time, we need to type the password, which is not something recommended in many security policies. This is where we will use the SSH feature to use authentication by using public/private keys.

SSH provides a tool for creating public/private keys to use for remote connection authentication, without the need to use a password. How do we do that? It's simple. For this test example we are going to create a new RSA key, a little bit more secure than the usual (we can create different types of keys such as dsa, ecdsa, ed25519):

$ ssh-keygen –t rsa -b 2048 -v

Then we follow the steps presented by the command. For a default installation, we can just keep typing Enter. Otherwise, we can always add some kind of passphrase to make it more secure. We may need to specify the key file name so we can use it later.

Then we need to copy the newly created keys file to the host that we want to connect to. There are two ways of doing this. The...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image