example: //我的秘钥保存路径C:\Users\MMA\.ssh\test,邮箱使用your_email@example.com ssh-keygen -t rsa -C "your_email@example.com" -f /c/Users/MMA/.ssh/test/github_rsa //运行之后弹出 $ ssh-keygen -t rsa -C "your_email@example.com" -f /c/User/MMA/.ssh/test/test/github_rsa Generating public/private rsa key pair. Enter passphrase (empty for no passphrase):
回车默认即可,出现下面提示,则创建成功
Your identification has been saved in /c/Users/MMA/.ssh/test/github_rsa. Your public key has been saved in /c/Users/MMA/.ssh/test/github_rsa.pub. The key fingerprint is: SHA256:AjEAqCT5VeTZsdHpklyMIVQQWbBVtAufE/P/GzkEw9I your_email@example.com The key's randomart image is: +---[RSA 2048]----+ |oo..o+OBBBo. | |+. .+.*.+=.o | |+. .. +.+++. E | |. . . +o.*. o | | . S.= . . | | . . .. .| | .+ | | .o| | .o| +----[SHA256]-----+
和创建github的相似 $ ssh-keygen -t rsa -C "my_email@example.com" -f /c/Users/MMA/.ssh/test/coding_rsa Generating public/private rsa key pair. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /c/Users/MMA/.ssh/test/coding_rsa. Your public key has been saved in /c/Users/MMA/.ssh/test/coding_rsa.pub. The key fingerprint is: SHA256:aqcMT/i9ZgXB6aCHus1zdf5JQlrLBYfUnnIBNJ37WIQ my_email@example.com The key's randomart image is: +---[RSA 2048]----+ | . o=+ o | | . +. oE . | | o o .o..= | | o . o .o= . | | . . S.oo.+ | | . . ..=oo. . | | +o +.o++ . | | . +B.+o .o . | | o=oo. .o | +----[SHA256]-----+