# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
/root/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase): [passphraseを入力] ※passphraseはログイン時に使用
Enter same passphrase again: [passphraseを入力]
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:Fyfc0Do9Wux/6uZgjLvM9nCq4mYVaOphgip9bx8I1eE root@xxxxxxxx.xxxxxxxx.local
The key's randomart image is:
+---[RSA 3072]----+
| . .. |
| o o o. |
| ..E ++o |
| .o . o+= |
| . .o S..= . |
|. . +. ....o. |
|.. + .... o =. |
|o . o = +.* .o .|
|. . *oooo*o.++o |
+----[SHA256]-----+
# ssh-copy-id root@192.168.xxx.xxx
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@192.168.xxx.xxx's password: [passwordを入力]
Number of key(s) added: 1