假设已经安装了git
1. 右键,打开git(git bash here)
2.生成公私钥对。ssh-keygen 一路回车
3. 将公钥拷贝到目标远程主机。ssh-copy-id -i ./.ssh/id_rsa.pub usr@ip(比如:root@192.168.102.131)
注:上面公钥路径:"./.ssh/id_rsa.pub",要在C:\Users\xxx(username)目录下右键git bash here。否则提示找不到。
或者在其他目录下 右键 git bash here,-i 后跟 id_rsa.pub的全路径