1 前言
有時候需要ppk格式的公鑰,可以用putty來處理
2 步驟
1. 產生密鑰
可以參考Gitlab的SSH配置(linux和windows雙版本)
$ ssh-keygen -t rsa -C your@example.com -b 4096 Generating public/private rsa key pair. Enter file in which to save the key (/c/Users/Administrator/.ssh/id_rsa): Created directory '/c/Users/Administrator/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /c/Users/Administrator/.ssh/id_rsa. Your public key has been saved in /c/Users/Administrator/.ssh/id_rsa.pub. The key fingerprint is: SHA256:nd6QS7KWq1234565vAzG+2VzshgL3KN3Ti7iF8mByQ your@example.com The key's randomart image is: +---[RSA 4096]----+ | | | | | E . ..o| | .oo ==| | N *+ =*| | S.+O *o*| | .=.+=.%.=.| | .o.o+.E.o | | .o..oo.o. | +----[SHA256]-----+
2. 使用puttygen轉換
保存為id_rsa.ppk,完成。然后拷貝其內容到網上設置SSH公鑰中黏貼。