【linux】在CentOS7上更改端口号时报错:Job for sshd.service failed because the control process exited with error
1、问题描述
在在CentOS7上更改端口号时报错:
Job for sshd.service failed because the control process exited with error code.See “systemctl status sshd.service” and “journalctl -xe” for details.
2、修改ssh端口号的方法
修改:$ sudo vi /etc/ssh/sshd_config
将 “#Port 22” 改为 “Port 11234”
将 “#PermitRootLogin yes” 改为 “PermitRootLogin no”
重启:sudo systemctl restart sshd.service
重启后报错
3、原因分析
查看SElinux允许的ssh的端口号
$ sudo semanage port -l | grep ssh
ssh_port_t tcp 22
发现SELinux允许的ssh的端口号和ssh配置文件中设置的端口号不一致。
4、解决方法
使用semanage工具添加ssh端口号
sudo semanage port -a -t ssh_port_t -p tcp 11234
重启
sudo systemctl restart sshd.service
【linux】在CentOS7上更改端口号时报错:Job for sshd.service failed because the control process exited with error相关推荐
- Docker服务启动时报错:Job for docker.service failed because the control process exited with error
报错信息: Job for docker.service failed because the control process exited with error code. See "sy ...
- Linux重启网卡报Job for network.service failed because the control process exited with error code. 错误
重启网卡报Job for network.service failed because the control process exited with error code. 错误 centos7下重 ...
- kali linux重启网卡失败:Job for networking.service failed because the control process exited with error...
1.取消勾选dhcp 2.配置静态ip(ip地址和默认网关查看虚拟网络编辑器) (1) vim /etc/network/interfaces (2) vim /etc/resolv.conf 3. ...
- Linux静态ip配置失效 重启网络虚拟机报错:Job for network.service failed because the control process exited
Linux静态ip配置失效 问题 笔者昨日对Linux(具体版本为CentOS-7-x86_64)静态ip进行配置,配置完成生效后昨日正常使用, 今日使用Xshell进行连接,连接失败, 查看ip地址 ...
- 排障集合——Nginx和Apache设置系统服务systemctl start时报错,Job for nginx.service failed because the control process
配置系统服务前价差了nginx配置,无误. [root@localhost system]# nginx -t nginx: the configuration file /usr/local/ngi ...
- mysqld占用mysql端口_IDEA连接不上MySQL端口号占用的解决
命令行下能正常登陆MYSQL,navicat能正常连接MySQL,但是IDEA连接不上MySQL,emmm,什么情况... 看了一下错误提示: 一直以为是MySQL密码或者是访问权限的问题. 困扰n天 ...
- ajax上传文件 获取失败,Ajax上传文件/照片时报错TypeError :Illegal invocation的解决方法...
本篇文章给大家带来的内容是关于Ajax上传文件/照片时报错TypeError :Illegal invocation的解决方法,有一定的参考价值,有需要的朋友可以参考一下,希望对你有所帮助. 问题 A ...
- 查询zookeeper端口号报错 stat is not executed because it is not in the whitelist
查询zookeeper端口号报错 stat is not executed because it is not in the whitelist. [root@qingchen bin]# echo ...
- Linux下常用服务的端口号超详细整理
来源: http://blog.csdn.net/u013943420/article/details/65938696 大家在学习计算机的时候,对于最常用的几个端口比如80端口肯定有很深的印象,但是 ...
最新文章
- select的5中子句where,group by, havaing, order by, limit的使用顺序及实例
- 关于PHP程序员解决问题的能力
- 物联网项目(三)平台架构
- Javascript设计模式(二)工厂模式
- 设置 无线网 连接到服务器未响应,设置无线路由器显示服务器未响应
- nacos + springcloud gateway 出现503错误
- 中国月球探测标识确定 寓龙的传人登月梦
- 方位角的表示及示意图
- 使用机器学习来进行应用识别
- 详细地址通过正则抽取省市区
- 物联网卡无法激活使用的原因
- Inno一个程序打包安装工具
- pytorch计算FLOPs
- 现代漫威联名钢铁侠车型开售 售价21.55万元起
- 昇腾Ascend处理器相关介绍
- “燕云十六将”之张永生(13)
- 毕业设计 基于stm32的血压测量检测系统 - 物联网 单片机
- Centos7静默安装Oracle11gR2
- maven中依赖变黄并提示Show vulnerabilities info for xxx.xxxx.xxxx:protobuf-java:3.11.4
- 丹麦奥尔堡大学计算机系博士,关于选拔博士研究生攻读上海大学-丹麦奥尔堡大学双博士学位的通知...
热门文章
- 少样本学习原理快速入门,并翻译《Free Lunch for Few-Shot Learning: Distribution Calibration》
- scp 命令 路径_基于SSH的文件传输:scp命令
- 点云深度学习的Pytorch框架
- Udacity机器人软件工程师课程笔记(二十) - 感知 - 校准,过滤, 分段, RANSAC
- Udacity机器人软件工程师课程笔记(三)-样本搜索和找回-基于漫游者号模拟器-使用moviepy输出测试视频
- linux内存布局及页面映射
- Go 分布式学习利器(12)-- Go语言的扩展和复用
- C++ 技能树(持续更新)
- SQL Server基础操作(此随笔仅作为本人学习进度记录七 !--存储过程)
- MongoDB安装和MongoChef可视化管理工具的使用