CentOS 7下安装telnet服务

yum -y install xinetd telnet telnet-server
# 允许 root 账号登陆

vi /etc/securetty
# 末尾添加两行

[html] view plain copy 在CODE上查看代码片派生到我的代码片
pts/0 
pts/1

# 添加防火墙端口

vi /etc/sysconfig/iptables 

-A INPUT -p tcp -m state --state NEW -m tcp --dport 23 -j ACCEPT

# 重启服务关闭 firewalld

systemctl restart iptables 
systemctl disable firewalld 
systemctl stop firewalld
# 注册服务

systemctl enable telnet.socket 
systemctl start telnet.socket 
systemctl enable xinetd 
systemctl start xinetd

# centos7下面安装telnet 没有生成 /etc/xinetd.d/telnet 文件,我照以前的配置自己写了个进去貌似没用处,网上也没找到更多资料了
# 现在这样临时用用也够了

CentOS 7下安装telnet服务

猜你喜欢

转载自www.linuxidc.com/Linux/2017-02/140349.htm