生成ssh公钥
ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:FnCdJPMa8nGV1PeSuFs/QnwPq+R+QySEbbot694J20s root@lilis
The key's randomart image is:
+---[RSA 2048]----+
| . +o.=oo |
| o ++.= . .|
| . + o+ . o.|
| o *. o + .|
| S o.+ . |
| . o oo+. |
| .oE+.+.|
| .O.o+.o|
| o+.O+...|
+----[SHA256]-----+
cat ~/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDkxXUiZDVLIx8wXegCXFEfpZ6pU4Dek
fYleuQIw0Xo1epEqVzolKEjvjyp6qseav7ZV7buWijvelwo9iiX244Il70BnNIM3q/W/9
jQHaJoC69PgLNcw8Wmzdh4oPykc6UeXXRKaA9GqWpzNDb4bvCCMtTM/cyG+9Pc9/Vm+cq
s3FMs04WaLP6a0E9r37GBW95GJnx5ky05uxXGmdK+tTE85oQm15X9P/w5yAPxWjexIZpI
/ogBN/GNBgjKcY8Wdt9/yfwxyB0ov1CIkHfAEylpZcEyMtYAbOZdpiTAyMzeeaQ8Qyct9
PzdoGeORLCy3OGjZft8fMqr4djK7uXli+cb root@lilis