设为首页 加入收藏

TOP

Centos-安装telnet远程
2023-08-26 21:10:43 】 浏览:41
Tags:Centos- 安装 telnet 远程

平时在运维的时候,有时候SSH无法使用的情况下就需要备用telnet远程,本文就简单分享如何安装配置telnet远程

一、获取安装包

安装包需要准备telnet\telnet-server\xintet,都是非常成熟的软件,可在线直接安装。

在线安装:

yum install telnet telnet-server xinetd -y

离线安装:先在有外网电脑缓存安装包、路径在/home/telnet下

yum install telnet telnet-server xinetd --downloadonly --downloaddir=/home/telnet

二、关闭防火墙和selinux

#关闭防火墙和selinux
systemctl stop firewalld.service
systemctl disable firewalld.service  
setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/sysconfig/selinux
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config  
sestatus

三、启动服务

#启动服务
systemctl start telnet.socket
systemctl start xinetd
systemctl status telnet.socket
systemctl status xinetd
systemctl enable telnet.socket
systemctl enable xinetd

 

四、添加终端允许、不然远程会被拦截

#这里可信终端可以多添加一些
echo 'pts/0' >>/etc/securetty
echo 'pts/1' >>/etc/securetty
echo 'pts/20' >>/etc/securetty

#重启服务
systemctl restart telnet.socket
systemctl restart xinetd
systemctl status telnet.socket
systemctl status xinetd

五、测试连接、打印日志

#如果报错,打印日志
tail -f /var/log/secure

 

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇WSL获得Ubuntu系统 下一篇【技术积累】Linux中的命令行【理..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目