Power Shell 生成ssh key
生成新的 SSH 公私钥对
以下PowerShell脚本检查是否存在已有的 SSH 公私钥对,如果不存在,则生成一对新的公私钥对
if ( (-not (Test-Path -Path $HOME/.ssh -PathType Container)) -or `
      (-not (Test-Path -Path $HOME/.ssh/id_rsa.pub -PathType Leaf)) -or `
      (-not (Test-Path -Path $HOME/.ssh/id_rsa -PathType Leaf)) ) {
  ssh-keygen
}
查看公钥
cat $HOME/.ssh/id_rsa.pub

 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号