fedora8下开启telnet

1、首先使用 chkconfig --list | grep telnet 命令查看telnet服务是否启用。
2、如果没有启用,则首先使用rpm -q telnet-server命令查看是否已安装telnet-server服务器软件包,默认情况下是不安装的。
3、安装telnet-server服务器软件包,可以使用yum或rpm方式,我们选用yum方式。安装过程如下:
[root@localhost ~]# yum install telnet-server
fedora                    100% |=========================| 2.1 kB    00:00    
updates                   100% |=========================| 2.6 kB    00:00    
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package telnet-server.i386 1:0.17-41.fc8 set to be updated
--> Processing Dependency: xinetd for package: telnet-server
--> Running transaction check
---> Package xinetd.i386 2:2.3.14-14.fc8 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
Package                 Arch       Version          Repository        Size 
=============================================================================
Installing:
telnet-server           i386       1:0.17-41.fc8    fedora             35 k
Installing for dependencies:
xinetd                  i386       2:2.3.14-14.fc8 fedora            123 k
Transaction Summary
=============================================================================
Install      2 Package(s)        
Update       0 Package(s)        
Remove       0 Package(s)        

Total download size: 158 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): telnet-server-0.17 100% |=========================| 35 kB    00:01    
(2/2): xinetd-2.3.14-14.f 100% |=========================| 123 kB    00:04    
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2
Importing GPG key 0x4F2A6FD2 "Fedora Project <[email protected]>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
Is this ok [y/N]: y
Importing GPG key 0xDB42A60E "Red Hat, Inc <[email protected]>" from /etc/pki/rpm-gpg/RPM-GPG-KEY
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: xinetd                       ######################### [1/2]
Installing: telnet-server                ######################### [2/2]

Installed: telnet-server.i386 1:0.17-41.fc8
Dependency Installed: xinetd.i386 2:2.3.14-14.fc8
Complete!
4、安装telnet-server后,需要设置telnet服务器:编辑/etc/xinetd.d/telnet配置文件,把起中的"disable=yes"改为"disable=no";或者是执行chkconfig telnet on命令激活telnet服务器。
5、使用chkconfig --list | grep telnet 命令查看telnet服务是否启用。
6、执行service xinetd restart重启xinetd守护进程。
7、在服务器端测试:执行telnet localhost命令,看是否可以成功登录。
8、编辑/etc/hosts文件,把客户机IP和名字加到其中。
9、远程登陆此服务器,如果出现无法登陆的情况,一般为服务器防火墙的原因
解决办法:
修改防火墙配置文件
vi /etc/sysconfig/iptables
加入
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 23 -j ACCEPT
然后重启iptables
service iptables restart
10、远程重新登录即可。

关键点:

1.selinux服务修改配置文件:/etc/selinux/config中:

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=Disabled 注:这才是关着的;(注释:修改这里)
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted

2.修改防火墙设置如上。

3.添加root登陆允许:

vi /etc/pam.d/login文档
在 auth required /lib/security/pam_securetty.so 前面加一个#号,注释掉就行了
这样就能够用root用户telnet了

你可能感兴趣的:(fedora8下开启telnet)