windows环境 怎么查ssh端口

Prew
Next

2022-05-16行业新闻返回列表

windows环境  怎么查ssh端口



1、netstat 命令‌查看 SSH 监听端口
netstat -ano | findstr "LISTEN" | findstr ":22"
netstat -ano | findstr "LISTEN" | findstr ":3333"
2、检查 SSH 端口配置
默认位置:C:\ProgramData\ssh\sshd_config(需管理员权限编辑)
命令查看        findstr /i "Port" C:\ProgramData\ssh\sshd_config

3、‌修改端口后需重启服务
net start sshd    :: 启动服务
net stop sshd     :: 停止服务

重启服务
net stop sshd && net start sshd


4、防火墙规则放行 SSH 端口(默认 22):
netsh advfirewall firewall add rule name="OpenSSH" dir=in action=allow protocol=TCP localport=22


netsh advfirewall firewall add rule name="OpenSSH" dir=in action=allow protocol=TCP localport=3333

telnet 192.168.0.10 3333
0
0
首页 电话咨询 微信咨询 联系我们
X泉州大圣软件开发有限责任公司

截屏,微信识别二维码

微信号:dashengsoft

(点击微信号复制,添加好友)

 打开微信

微信号已复制,请打开微信添加咨询详情!
泉州大圣软件开发有限责任公司扫一扫咨询微信客服
在线客服
服务热线

联系电话

19108459981

微信咨询
泉州大圣软件开发有限责任公司
返回顶部