我是靠谱客的博主 机灵水蜜桃,这篇文章主要介绍Linux配置telnet服务端首先检查是否已经安装没有安装则安装暂时启动服务配置开机自启动安全配置关闭防火墙防火墙相关设置命令,现在分享给大家,希望可以做个参考。
参考:
1、CentOS7环境下安装telnet服务
2、CentOS7开启telnet服务端,配合进行ssh升级
3、关闭防火墙依然无法访问服务器端口解决方案【亲测有效】
首先检查是否已经安装
命令:
rpm -qa telnet-server
rpm -qa xinetd
示例:已经安装。
[root@cvknode ~]$ rpm -qa telnet-server
telnet-server-0.17-66.el7.x86_64
[root@cvknode ~]$ rpm -qa xinetd
xinetd-2.3.15-14.el7.x86_64
[root@cvknode ~]$
没有安装则安装
使用yum -y install telnet-server.x86_64命令安装telnet服务器,
使用yum -y install xinetd.x86_64命令安装xinetd守护进程。
yum -y install telnet-server.x86_64
yum -y install xinetd.x86_64
暂时启动服务
使用systemctl start telnet.socket与systemctl start xinetd命令启动telnet服务。
[root@localhost ~]# systemctl start telnet.socket
[root@localhost ~]# systemctl start xinetd
配置开机自启动
使用systemctl enable xinetd.service与systemctl enable telnet.socket命令将telnet服务设置为开机自动启动。
[root@cvknode ~]# systemctl enable xinetd.service
[root@cvknode ~]# systemctl enable telnet.socket
安全配置
此时还无法使用root登录,会提示登录错误。因为默认root无法远程访问。
| | --- |
|---| --| | * |--| | | /
| | --- |___ | | | |__| / Instance (H3Linux Release 1.1.0)
cvknode login: root
Password:
Login incorrect
需要修改/etc/securetty文件。
[root@localhost ~]# vim /etc/securetty
在末尾添加以下内容:添加多个可支持多个远程终端运行。
pts/0
pts/1
pts/2
...
...
关闭防火墙
一般关闭
临时关闭防火墙
systemctl stop firewalld.service
设置禁止开机启动防火墙
systemctl disable firewalld.service
防火墙相关设置命令
- 启动:
systemctl start firewalld- 查看状态:
systemctl status firewalld- 停止:
systemctl disable firewalld- 禁用:
systemctl stop firewalld- 启动服务:
systemctl start firewalld.service- 关闭服务:
systemctl stop firewalld.service- 重启服务:
systemctl restart firewalld.service- 服务的状态:
systemctl status firewalld.service- 在开机时启用一个服务:
systemctl enable firewalld.service- 在开机时禁用一个服务:
systemctl disable firewalld.service- 查看服务是否开机启动:
systemctl is-enabled firewalld.service- 查看已启动的服务列表:
systemctl list-unit-files|grep enabled- 查看启动失败的服务列表:
systemctl --failed- 查看版本:
firewall-cmd --version- 查看帮助:
firewall-cmd --help- 显示状态:
firewall-cmd --state- 查看所有打开的端口:
firewall-cmd --zone=public --list-ports- 更新防火墙规则:
firewall-cmd --reload- 查看区域信息:
firewall-cmd --get-active-zones- 查看指定接口所属区域:
firewall-cmd --get-zone-of-interface=eth0- 拒绝所有包:
firewall-cmd --panic-on- 取消拒绝状态:
firewall-cmd --panic-off- 查看是否拒绝:
firewall-cmd --query-panic
最后
以上就是机灵水蜜桃最近收集整理的关于Linux配置telnet服务端首先检查是否已经安装没有安装则安装暂时启动服务配置开机自启动安全配置关闭防火墙防火墙相关设置命令的全部内容,更多相关Linux配置telnet服务端首先检查是否已经安装没有安装则安装暂时启动服务配置开机自启动安全配置关闭防火墙防火墙相关设置命令内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复