Linux服务器修改ssh默认22端口方法
来源:互联网 发布:js中数组删除指定元素 编辑:程序博客网 时间:2024/06/01 17:14
1、登录服务器,打开sshd_config文件
vim /etc/ssh/sshd_config
2、找到#Port 22,默认是注释掉的,先把前面的#号去掉,再插入一行设置成你想要的端口号,注意不要跟现有端口号重复
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.
Port 22
Port 10086
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.
Port 22
Port 10086
3、保存后退出,执行重启命令
service sshd restart
4、新开一个终端窗口测试10086端口是否可以正常连接服务器,如果成功则将Port 22删除,之所以先设置成两个端口,测试成功后再关闭一个端口,是为了方式在修改conf的过程中,万一出现掉线、断网、误操作等未知情况时候,还能通过另外一个端口连接上去调试以免发生连接不上必须派人去机房,导致问题更加复杂麻烦。
阅读全文
0 0
- Linux服务器修改ssh默认22端口方法
- Linux下SSH默认22端口的修改方法。
- 修改Linux SSH默认22端口的几种方法
- Linux下SSH默认22端口的修改方法
- LINUX 修改SSH默认22端口的方法
- 修改Linux SSH默认22端口
- linux 修改ssh默认端口
- linux服务器修改ftp默认21端口方法
- 修改ssh默认端口的方法
- linux修改ssh默认的端口
- linux下修改ssh默认端口号
- Linux,修改SSH默认端口号
- CentOS/Linux 修改默认SSH端口号
- CentOS/Linux 修改默认SSH端口号
- 修改ssh默认端口
- ssh默认端口修改
- 我的服务器开发之路-服务器SSH默认端口22和ftp默认端口21修改
- CentOS 修改SSH远程端口/默认端口(Port)方法
- 无法连接到sql数据库,在与sql server建立连接时出现与网络,Microsoft SQL Server,错误: 1326
- Python程序练习3--模拟购物车
- nginx学习随笔--multi_accept
- 函数声明与函数表达式的区别
- linux下读取bmp图片文件头
- Linux服务器修改ssh默认22端口方法
- C#正则表达式 匹配磁盘路径和文件名
- Elasticsearch常用配置及性能参数
- 多线程笔记
- 正则表达式30分钟入门教程
- 新浪微博created_at字段转换成java算法
- 文件转文件流,本地和远程
- java中对于synchronized 同步锁的理解
- jsp页面转换时间戳格式