SSH和Windows远程端口修改
来源:http://www.tudoupe.com时间:2022-05-04
ssh 更改默认远程端口
---------------------centos6-----------------
1.查看系统版本
cat /etc/redhot-releose
2。 更改 sshd 设置中的默认端口 。
vim
/etc/ssh/sshd_config
无法关闭临时文件夹:%s。
#port 22
port 1220
保存退出
3. 重新启动 sshd 服务。
/etc/init.d/sshd restart
或者
service sshd restart
4.修改防火墙
vim /etc/sysconfig/iptables
tcp-p tcp- dport 1220 (port) - j ACMEPT - A INPUT-m status - state New-m tcp-p tcp- p tcp- dport 1220 (port) - A INPUT-m status - new-m tcp-p tcp-d
5.重启防火墙
service iptables restart
策略生效:
service iptables save
---------------------centos7-----------------
将新港口的情况通知Selinux
# semanage port -a -t ssh_port_t -p tcp 1220
/ 重新发射shsh
# systemctl restart sshd.service
/ 检查 ssh 状态
# service sshd status
// 开启防火墙
# systemctl start firewalld.service
// 关闭防火墙
# systemctl stop firewalld.service
// 重启防火墙
# systemctl restart firewalld.service
检查防火墙的状态
# systemctl status firewalld.service
----------------------windows--------------------
1. 开始 -- -- 运行 -- -- 退退 -- -- 登记表格
2.HKEY_LOCAL_MACHINE----SYSTEM---CurrentControlSet----Control--
Terminal Server----Wds---Tds---tcp
3, Expand tcp, 发现 Prot序号的十进制值, 并调整自定义端口( 不超过 65536 ) 。
4.Terminal Server----WinStations----RDP-Tcp
五,发现ProtNummer-十进制值,并改成相同的港口号。
第六. 改进允许进入港口的防火墙进入规则
第七,在更新工作完成后,重新启动将有效。
更多参考
修改SSH 和 Windows 远程端口
https://www.csdn.net/tags/NtDaYg0sOTg0NC1ibG9n.html
Windows XP 上的 Windows 服务器 ssh_set SSH 服务器配置
https://www.csdn.net/tags/OtDaUgwsMDUzMy1ibG9n.html
更改 ssh 服务器访问端口号
https://blog.csdn.net/sunday2018/article/details/122915935
什么是SSH?在Linux更改SSH港口号的程序是什么?
https://jingyan.baidu.com/article/414eccf61b23ca6b431f0ad8.html
在 Windows 10 上安装内置的开关服务器并修改端口号 。
https://www.bilibili.com/read/cv2421856
ssh指定端口连接
https://blog.csdn.net/qq_40245974/article/details/104738358
SSH 命令的 11 个应用程序
https://www.linuxprobe.com/ssh-use-11.html
SSH 远程到由主机提供的端口
https://www.cnblogs.com/timetellu/p/13037085.html
相关新闻
- 2022-08-04 WPF的由来
- 2022-08-04 Win11勒索软件防护怎么打开?Win11安
- 2022-08-04 Windows系统jdk的配置
- 2022-08-04 Windows10 OneNote怎么重新登录?如何重
- 2022-08-04 超好用的 Windows 效率工具推荐
- 2022-08-04 Windows如何在CMD或PowerShell中配置代理
- 2022-08-04 powershell和cmd对比
- 2022-08-04 【QT】Windows下QT下载安装
- 2022-08-04 windows下 C++ 实现类属性的get和set方
- 2022-08-04 Win11快速助手在哪里?Win11打开快速
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
