一、安装OpenSSH 客户端 、OpenSSH 服务器
设置 -> 管理可选功能 -> 添加功能 -> [OpenSSH 客户端] [OpenSSH 服务器]
1、设置

2、管理可选功能

3、添加功能 :OpenSSH 客户端 OpenSSH 服务器

二、启动服务并设置为自动启动
SSH服务 -> 启动 SSH服务 -> 属性 -> 启动选择 -> 自动
1、查看 SSH服务


2、服务启动并设置自动启动
【OpenSSH Authentication Agent】 / 【OpenSSH SSH Server】
==》 右击
==》 启动
【OpenSSH Authentication Agent】 / 【OpenSSH SSH Server】
==》 右击
==》 属性
==》 启动类型:自动

三、验证SSH
1、C:\Windows\System32\OpenSSH
安装的SSH程序都在这了,客户端的,服务端的都在这。


2、powershell : ssh命令

四、密码方式远程 — Windows、Linux 服务器
ssh 主机地址 -p 端口号
1、使用密码连接Linux服务器 (这里远程的是阿里云的一台Linux服务器)
伪代码:ssh Rlzhroupt_root@114.112.119.110 -p 9998
2、密码连接 windows 服务器
密码前

密码后

六、密钥方式远程 —Linux、 Windows 服务器
1、客户机通过 ssh-keygen 生成密钥对,一路enter。

2、服务器添加公钥
新建 authorized_keys.txt 文本文件,
将客户端生成的公钥 id_rsa.pub 复制进去。
然后重命名去除.txt文件后缀。


3、服务端重启 OpenSSH Server 服务

图解 -- Win10 OpenSSH
原文:https://www.cnblogs.com/sunchong/p/10171870.html