$ ssh-keygen -t rsa -f ~/.ssh/id_rsa.github -C "liupaopao520@163.com" Generating public/private rsa key pair. Enter passphrase (empty for no passphrase): Enter same passphrase again: Passphrases do not match. Try again. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /c/Users/Administrator/.ssh/id_rsa.github Your public key has been saved in /c/Users/Administrator/.ssh/id_rsa.github.pub
Administrator@DESKTOP-4IPRNUP MINGW64 ~/.ssh $ ssh-keygen -t rsa -f ~/.ssh/id_rsa.gitee -C "liupaopao520@163.com" Generating public/private rsa key pair. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /c/Users/Administrator/.ssh/id_rsa.gitee Your public key has been saved in /c/Users/Administrator/.ssh/id_rsa.gitee.pub
随后,会在~/.ssh 文件夹下出现 GitHub 和 Gitee 独立的公钥和私钥:
1 2
$ ls id_rsa.gitee id_rsa.gitee.pub id_rsa.github id_rsa.github.pub known_hosts