The telnet package must be installed when the telnet service is enabled in Linux.
Run the following command to check whether the Telnet package is installed:
Rpm-Qa Telnet
[Root @ localhost xinetd. d] # rpm-Qa Telnet
Telnet-0.17-39.el5
If yes, the telnet version is displayed. If Not Installed
Application-Add/delete programs to install the Telnet software package.
After installing telnet, You need to modify two configuration files.
[Root @ localhost etc] # cd/etc/xinetd. d
[Root @ localhost xinetd. d] # ls
Chargen-dgram discards-dgram ekrb5-telnet ktalk time-stream
Chargen-stream discard-stream gssftp rsync
CVS echo-dgram Klogin tcpmux-Server
Daytime-dgram echo-stream krb5-telnet TFTP
Daytime-stream eklogin kshell time-dgram
View profiles: ekrb5-telnet, krb5-telnet
The ekrb5-telnet configuration Telnet encrypted connection is generally set to off
View the content of two configuration files
[Root @ localhost xinetd. d] # krb5-telnet more
# Default: Off
# Description: The authenticated Telnet Server accepts normal Telnet sessions ,/
# But can also use Kerberos 5 authentication.
Service telnet
{
Disable = No
Flags = Reuse
Socket_type = stream
Wait = No
User = root
Server =/usr/Kerberos/sbin/telnetd
Log_on_failure + = userid
}
[Root @ localhost xinetd. d] # ekrb5-telnet more
# Default: Off
# Description: The authenticated Telnet Server accepts only Telnet sessions ,/
# Which use Kerberos 5 authentication and encryption.
Service telnet
{
Disable = Yes
Flags = Reuse
Socket_type = stream
Wait = No
User = root
Server =/usr/Kerberos/sbin/telnetd
Server_args =-e
Log_on_failure + = userid
}
Set disable in the erkb5-telnet file to disabled (yes ):
[Root @ localhost xinetd. d] # chkconfig ekrb5-telnet off
Set disable in krb5-telnet to available (NO );
[Root @ localhost xinetd. d] # chkconfig krb5-telnet on
Check whether the configuration file has the same attributes as the one shown above.
Restart the xinetd service.
[Root @ localhost xinetd. d] # service xinetd restart
Stop xinetd: [OK]
Start xinetd: [OK]
You can use Telnet to connect to a Linux IP address.
[Root @ localhost xinetd. d] # IP ADDR
1: Lo: <loopback, up, lower_up> MTU 16436 qdisc noqueue
Link/loopback 00: 00: 00: 00: 00: 00 BRD 00: 00: 00: 00: 00: 00
Inet 127.0.0.1/8 Scope host Lo
Inet6: 1/128 scope host
Valid_lft forever preferred_lft forever
2: eth0: <broadcast, multicast, up, lower_up> MTU 1500 qdisc pfifo_fast qlen 1000
Link/ether 00: 0C: 29: Fe: de: 56 brd ff: FF
Inet 192.168.1.104/24 BRD 192.168.1.255 scope global eth0
Inet6 fe80: 20c: 29ff: Fefe: de56/64 scope Link
Valid_lft forever preferred_lft forever
3: sit0: <noarp> MTU 1480 qdisc Noop
Link/Sit 0.0.0.0 BRD 0.0.0.0
The inet in 2 is followed by the IP address. In this example, the IP address is 192.168.1.104.
The process for enabling the FTP service is roughly the same as that for telnet.
[Root @ localhost xinetd. d] # More gssftp
# Default: Off
# Description: The specified FTP Server accepts FTP connections/
# That can be authenticated with Kerberos 5.
Service ftp
{
Flags = Reuse
Socket_type = stream
Wait = No
User = root
Server =/usr/Kerberos/sbin/ftpd
Server_args =-l
Log_on_failure + = userid
Disable = No
}
Run the VI gssftp command to modify the gssftp file:
Server_args =-l-A ==> server_args =-l
Disable = yes => disable = No
Save the modification and exit. Restart the xinetd service.
Service xinetd restart can use the FTP service