Files
certd/docs/guide/use/host/windows.md
T

28 lines
910 B
Markdown
Raw Normal View History

2024-10-19 22:49:33 +08:00
# 连接windows主机
2024-06-27 16:38:43 +08:00
远程主机基于ssh协议,通过ssh连接远程主机,执行命令。
## windows开启OpenSSH Server
2024-10-20 00:18:50 +08:00
### 1. 安装OpenSSH Server
2024-10-30 01:44:02 +08:00
* 下载安装包安装: https://github.com/PowerShell/Win32-OpenSSH/releases OpenSSH-Win64-vxx.xx.x.msi
* 前往Microsoft官方文档查看如何开启openSSH,以及其他设置
2024-06-27 16:38:43 +08:00
https://learn.microsoft.com/zh-cn/windows-server/administration/openssh/openssh_install_firstuse?tabs=gui#install-openssh-for-windows
2024-10-20 00:18:50 +08:00
### 2. 启动OpenSSH Server服务
2024-06-27 16:38:43 +08:00
```
win+R 弹出运行对话框,输入 services.msc 打开服务管理器
找到 OpenSSH SSH Server
启动ssh server服务,并且设置为自动启动
```
2024-10-20 00:18:50 +08:00
### 3. 测试ssh登录
2024-06-27 16:38:43 +08:00
使用你常用的ssh客户端,连接你的windows主机,进行测试
```cmd
# 如何确定你用户名
2024-10-20 00:18:50 +08:00
C:\Users\xxxxx>
2024-06-27 16:38:43 +08:00
↑↑↑↑---------这个就是windows ssh的登录用户名
```