1、检查是否已经安装相应的软件包:
[root@ybtbak etc]# rpm -qa | grep telnet
2、如果没有安装,则从光盘中将telnet和telnet-server包上传到服务器上或者直接网络安装
采用本地安装:
[root@ybtbak tmp]# rpm -ivh telnet-server-0.17-47.el6.x86_64.rpm
warning: telnet-server-0.17-47.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
1:telnet-server ########################################### [100%]
[root@ybtbak tmp]# rpm -ivh telnet-0.17-47.el6.x86_64.rpm
warning: telnet-0.17-47.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
1:telnet ########################################### [100%]
采用网络安装:
[root@ybtbak tmp]# yum install telnet telnet-server
3、检查telnet服务状态:
[root@ybtbak tmp]# chkconfig --list | grep telnet
telnet: 关闭
4、修改telnet服务状态:
[root@ybtbak ~]# cd /etc/xinetd.d
[root@ybtbak xinetd.d]# pwd
/etc/xinetd.d
[root@ybtbak xinetd.d]# ls
chargen-dgram cvs daytime-stream discard-stream echo-stream tcpmux-server time-dgram
chargen-stream daytime-dgram discard-dgram echo-dgram rsync telnet time-stream
[root@ybtbak xinetd.d]# cat telnet
# default: on
# description: The telnet server serves telnet sessions; it uses \
# unencrypted username/password pairs for authentication.
service telnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
disable = no
}
[root@ybtbak xinetd.d]# service xinetd restart
停止 xinetd: [确定]
正在启动 xinetd: [确定]
5、解决root远程telnet限制
[root@ybtbak ~]# vi /etc/pam.d/remote
注释掉auth required pam_securetty.so这行,保存
--转自