Home/Server & Website Managed Operations/Logging into Linux Servers via SSH Key Authentication
Server & Website Managed Operations
Logging into Linux Servers via SSH Key Authentication
Published 2015-08-15By adminCategory Server & Website Managed Operations11 min read
In addition to password authentication, SSH offers another commonly used method: key-based authentication. Its advantages include enhanced security and the ability to enable passwordless login between Linux systems, facilitating management or batch maintenance.
This article explains how to configure key-based passwordless login for Linux servers on both Windows and Linux.
This table is wide — scroll sideways to see it all
01
[root@A ~]# ssh-keygen -t rsa
This table is wide — scroll sideways to see it all
02
This table is wide — scroll sideways to see it all
03
Generating public/private rsa key pair.
This table is wide — scroll sideways to see it all
04
This table is wide — scroll sideways to see it all
05
Enter fileinwhichto save the key (/root/.ssh/id_rsa):
This table is wide — scroll sideways to see it all
06
// Path and filename where the key will be saved
This table is wide — scroll sideways to see it all
07
This table is wide — scroll sideways to see it all
08
Enter passphrase (empty forno passphrase):
This table is wide — scroll sideways to see it all
09
This table is wide — scroll sideways to see it all
10
// Passphrase for the key; leave empty for passwordless login
This table is wide — scroll sideways to see it all
11
This table is wide — scroll sideways to see it all
12
Enter same passphrase again:
This table is wide — scroll sideways to see it all
13
This table is wide — scroll sideways to see it all
14
Your identification has been saved in/root/.ssh/id_rsa
This table is wide — scroll sideways to see it all
15
This table is wide — scroll sideways to see it all
16
// Private key generated at /root/.ssh/id_rsa
This table is wide — scroll sideways to see it all
17
This table is wide — scroll sideways to see it all
18
Your public key has been saved in/root/.ssh/id_rsa.pub
This table is wide — scroll sideways to see it all
19
This table is wide — scroll sideways to see it all
20
// Public key generated at /root/.ssh/id_rsa.pub
This table is wide — scroll sideways to see it all
21
This table is wide — scroll sideways to see it all
22
The key fingerprint is:
This table is wide — scroll sideways to see it all
23
This table is wide — scroll sideways to see it all