从 Windows 10 开始,Windows 开始自带 OpenSSH 工具
Windows SSH 配置目录,%USERPROFILE%\.ssh\
OpenSSH 文件目录 %SystemRoot%\System32\OpenSSH\
配置 OpenSSH 使用私钥登录 的配置
修改 %USERPROFILE%\.ssh\config 文件
添加配置,格式如下
config
host 配置名
user 登录用户
hostname 服务器IP
identityfile 配置地址
示例
host P1
user root
hostname 192.168.0.101
identityfile C:\Users\Admin\.ssh\P1_Key.pem
使用 OpenSSH 配置登录
C:\Users\Azure>ssh P1 Last login: Thu Sep 9 08:50:49 2021 from 192.168.0.101 Welcome to Alibaba Cloud Elastic Compute Service ! [root@iZpuhn5xcz2ixcZ ~]#