开启telnet服务

一、开启telnet服务

通常telnet包是系统默认安装的,做为客户端;telnet-server包需要自行安装,做为服务端。

(2)安装telnet-server

yum  -y  install   telnet-server

(4)开启telnet服务(有两种方式)

a)vi /etc/xinetd.d/telnet,将disable=yes改成disable=no;

 b)chkconfig telnet on;如果需要设置telnet服务为开机自启动,使用命令chkconfig -add telnet或者chkconfig --add telnet

(5)激活telnet服务

使用命令server xinet drestart或者/etc/init.d/xinetd restart使更改生效。

(6)测试telnet服务是否可用

二、关闭telnet服务

(1)关闭telnet服务(有两种方式)

a)vi /etc/xinetd.d/telnet,将disable=no改成disable=yes;

 b)chkconfig telnet off;如果需要设置telnet服务不为开机自启动,使用命令chkconfig -del telnet或者chkconfig --del telnet

(2)使用命令server xinetd restart或者/etc/init.d/xinetd restart使更改生效。

(4)vi /etc/services,注释23号端口。

猜你喜欢

转载自www.cnblogs.com/linuxws/p/11990413.html