Windows2012 R2配置SSH
一、下载OpenSSH
1 | https://github.com/PowerShell/Win32-OpenSSH/releases |
二、执行安装
1 | cmd |

三、修改默认22端口
1 | C:\Program Files\OpenSSH-Win64\sshd_config_default |
四、启动ssh
1 | net start sshd |
五、配置开机自动启动
1 | sc config sshd start= auto |
六、防火墙放行端口
1 | Open the firewall for sshd.exe to allow inbound SSH connections |
七、配置环境变量
1 | 将C:\Program Files\OpenSSH-Win64放入系统变量Path下即可 |
八、远程连接测试
1 | $ ssh -p 2022 administrator@192.168.1.153 |
九、卸载openssh
1 | powershell.exe -ExecutionPolicy Bypass -File uninstall-sshd.ps1 |
- Title: Windows2012 R2配置SSH
- Author: 𝓓𝓸𝓷
- Created at : 2024-07-07 16:55:01
- Updated at : 2024-07-20 05:15:41
- Link: https://www.zhangdong.me/windows-configure-ssh.html
- License: This work is licensed under CC BY-NC-SA 4.0.
评论
