fedora 8 配置telnet服务
2009年07月03日 星期五 上午 10:35
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 <fedora@redhat.com>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
Is this ok [y/N]: y
Importing GPG key 0xDB42A60E "Red Hat, Inc <security@redhat.com>" 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、远程重新登录即可。
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 <fedora@redhat.com>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
Is this ok [y/N]: y
Importing GPG key 0xDB42A60E "Red Hat, Inc <security@redhat.com>" 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、远程重新登录即可。