Public key authantication

Deregulation of the ssh (Temporarily allow password login)

vi /etc/ssh/sshd_config
PermitRootLogin yes
PasswordAuthentication yes

systemctl restart sshd

Generate public authentication key. Register remotely.

# Create pub key
~~ssh-keygen -t rsa -b 4096~~
ssh-keygen -t ed25519

# Install
ssh-copy-id -i ~/.ssh/id_ed25519.pub root@192.168.24.47

Withdraw deregulation.

vi /etc/ssh/sshd_config
PermitRootLogin prohibit-password
PasswordAuthentication no

systemctl restart sshd

OK if you can log in.