1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| ssh-keygen -t rsa -b 4096 #执行创建命令,-b参数为指定密钥长度 Generating public/private rsa key pair. Enter file in which to save the key (/home/user/.ssh/id_rsa): Enter passphrase (empty for no passphrase): #设置密钥密码,可以直接回车跳过 Enter same passphrase again: #确认密码,可以直接回车跳过 Your identification has been saved in /home/user/.ssh/id_rsa. #公钥 Your public key has been saved in /home/user/.ssh/id_rsa.pub. #私钥 The key fingerprint is: SHA256:B25KhIK5xNfR3j7SBi52+e2Z+t0K7Ouhg3IzRqxyuEE pi@Debian The key's randomart image is: +---[RSA 4096]----+ | .. | |.o .... | |oo....o o | |.... . + o | |. E + S . | | . + X *. | | .o * = o+ | | o.+ * oo.* . | | .+ + oo*O.o.. | +----[SHA256]-----+
|