ssh

服务器创建密钥#

root@mg12051871279501160:~# ssh-keygen -t ed25519 -C "srv@isrv.cn"
Generating public/private ed25519 key pair.
Enter file in which to save the key (/root/.ssh/id_ed25519): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /root/.ssh/id_ed25519
Your public key has been saved in /root/.ssh/id_ed25519.pub
The key fingerprint is:
SHA256:2N8hKCMMAJ5Org2Fc7n6AhxZvQyuThVIDvtNzDGKkwY srv@isrv.cn
The key's randomart image is:
+--[ED25519 256]--+
|E.. +            |
|=B.O +           |
|B*X B .          |
|=O O o o .       |
|oo* + + S . .    |
|oB   . o . o .   |
|* .       . .    |
|.o               |
| ..              |
+----[SHA256]-----+
root@mg12051871279501160:~# cd .ssh/
root@mg12051871279501160:~/.ssh# ls
authorized_keys  id_ed25519  id_ed25519.pub