Telnet configuration in SuSE

Source: Internet
Author: User

1. Check whether Telnet has been started
Linux :~ # Chkconfig-list | grep Telnet
TELNET: Off
2. view the Telnet STARTUP configuration file
Linux:/etc/xinetd. D # More Telnet
# Default: Off
# Description: telnet is the old Login server which is insecure and shold/
# Therefore not be used. Use Secure Shell (openssh ).
# If you need telnetd not to "keep-alives" (e.g. If it runs over a ISDN/
# Uplink), add "-n". See 'man telnetd' for more details.
Service telnet
{
Socket_type = stream
Protocol = TCP
Wait = No
User = root
Server =/usr/sbin/in. telnetd
Disable = Yes
}
At this time, you still cannot log on via Telnet
3. Use the following method to start
Linux:/etc/xinetd. D # chkconfig telnet on
Linux:/etc/xinetd. D # chkconfig-list | grep Telnet
TELNET: On
Linux:/etc/xinetd. D # ls
4. Check the configuration file information and find that the disable does not exist.
Linux:/etc/xinetd. D # More Telnet
# Default: Off
# Description: telnet is the old Login server which is insecure and shold/
# Therefore not be used. Use Secure Shell (openssh ).
# If you need telnetd not to "keep-alives" (e.g. If it runs over a ISDN/
# Uplink), add "-n". See 'man telnetd' for more details.
Service telnet
{
Socket_type = stream
Protocol = TCP
Wait = No
User = root
Server =/usr/sbin/in. telnetd
}
However, you still cannot log on via Telnet.
5. You need to restart xinetd Because telnet is embedded in the Xinetd super process and must be started through it.
Linux:/etc/init. d #./xinetd stop
Shutting down xinetd: Done
Linux:/etc/init. d #./xinetd start
Starting Inet services. (xinetd) done
Linux:/etc/init. d #
In this case, you can use Telnet to log on to another normal user, but cannot use root to log on. The information is as follows:
Welcome to SuSE Linux Enterprise Server 9 (i586)-kernel 2.6.5-7.97-SMP (1 ).
Linux Login: Root
Password:
Login incorrect

Linux Login: Root
Password:
Login incorrect

Linux Login: Oracle
Password:
Last login: Thu Jun 18 13:28:28 from 118.29.25.113
Oracle @ Linux: ~>

5. perform the following operations to allow the root user to log on, but it is not recommended. To ensure security
Linux:/etc # mv securetty. Bak ---- be sure to use this step
Linux:/etc #
Linux:/etc # More ftpusers
Pop
Postfix
Postgres
# Root ---- add one before root # comment out
Sapdb
Skyrix
Squid
Uucp
Virtuoso
After saving and exiting, you can use root to log on. The information is as follows:
Welcome to SuSE Linux Enterprise Server 9 (i586)-kernel 2.6.5-7.97-SMP (1 ).
Linux Login: Root
Password:
2 failures since last login. Last was 14:25:24 on 1.
You have new mail in/var/mail/root.
Last login: Fri Jun 19 14:11:14 from 118.29.25.112
Linux :~ #
6. Only one IP address is allowed to log on, for example, 223.78.75.188.
Linux:/etc/xinetd. D # vi Telnet

# Default: Off
# Description: telnet is the old Login server which is insecure and shold/
# Therefore not be used. Use Secure Shell (openssh ).
# If you need telnetd not to "keep-alives" (e.g. If it runs over a ISDN/
# Uplink), add "-n". See 'man telnetd' for more details.
Service telnet
{
Socket_type = stream
Protocol = TCP
Wait = No
User = root
Server =/usr/sbin/in. telnetd
Only_from = 223.78.75.188 ----- test the parameters to be written in this step.
}
After saving and exiting, restart the xinetd service, which has been used before and is not repeated here.
Then, I cannot Telnet through my computer 118.29.25.112.

7. Only allow my computer 118.29.25.112 to log on within a certain period of time, such-
Linux:/etc/xinetd. D # vi Telnet

# Default: Off
# Description: telnet is the old Login server which is insecure and shold/
# Therefore not be used. Use Secure Shell (openssh ).
# If you need telnetd not to "keep-alives" (e.g. If it runs over a ISDN/
# Uplink), add "-n". See 'man telnetd' for more details.
Service telnet
{
Socket_type = stream
Protocol = TCP
Wait = No
User = root
Server =/usr/sbin/in. telnetd
Only_from &

 

------------------------------------------------

Service telnet
{
Socket_type = stream
Protocol = TCP
Wait = No
User = root
Server =/usr/sbin/in. telnetd
Only_from = 118.29.25.112 ----- test the parameters to be written in this step.
Access_times =------ test the parameters to be written.
 
}
After saving and exiting, restart the xinetd service, which has been used before and is not repeated here.
In this case, telnet is unavailable because the time does not match.
If you change the time to correct --, you can log on. The information is as follows:
Linux:/etc/xinetd. D # vi Telnet
 
# Default: Off
# Description: telnet is the old Login server which is insecure and shold/
# Therefore not be used. Use Secure Shell (openssh ).
# If you need telnetd not to "keep-alives" (e.g. If it runs over a ISDN/
# Uplink), add "-n". See 'man telnetd' for more details.
Service telnet
{
Socket_type = stream
Protocol = TCP
Wait = No
User = root
Server =/usr/sbin/in. telnetd
Only_from = 118.29.25.112 ----- test the parameters to be written in this step.
Access_times =------ test the parameters to be written.
 
}
Try to log on
Welcome to SuSE Linux Enterprise Server 9 (i586)-kernel 2.6.5-7.97-SMP (1 ).

Linux Login: Oracle
Password:
Last login: Fri Jun 19 14:38:29 from 118.29.25.112
Oracle @ Linux: ~> 8. Each client can have up to three Telnet connections to the server at the same time.
Linux:/etc/xinetd. D # vi Telnet
 
# Default: Off
# Description: telnet is the old Login server which is insecure and shold/
# Therefore not be used. Use Secure Shell (openssh ).
# If you need telnetd not to "keep-alives" (e.g. If it runs over a ISDN/
# Uplink), add "-n". See 'man telnetd' for more details.
Service telnet
{
Socket_type = stream
Protocol = TCP
Wait = No
User = root
Server =/usr/sbin/in. telnetd
Only_from = 118.29.25.112
Access_times =-
Per_source = 3 ----- test the parameters to be written in this step.
 
}
After saving and exiting, restart the xinetd service, which has been used before and is not repeated here.
At this time, when you connect, you cannot connect to 4th connections. 9. Do not log on to my computer 118.29.25.112.
Linux:/etc/xinetd. D # vi Telnet
 
# Default: Off
# Description: telnet is the old Login server which is insecure and shold/
# Therefore not be used. Use Secure Shell (openssh ).
# If you need telnetd not to "keep-alives" (e.g. If it runs over a ISDN/
# Uplink), add "-n". See 'man telnetd' for more details.
Service telnet
{
Socket_type = stream
Protocol = TCP
Wait = No
User = root
Server =/usr/sbin/in. telnetd
Only_from = 223.78.75.188
No_access = 118.29.25.112 ----- test the parameters to be written in this step.
Access_times =-
Per_source = 3
 
}
After saving and exiting, restart the xinetd service, which has been used before and is not repeated here.
At this time, when my computer is connected, it cannot be successful. 10. disable the Telnet service.
Linux :~ # Chkconfig telnet off
Linux :~ # Chkconfig-list | grep Telnet
TELNET: Off
Linux :~ # The following is a reference:
Modify the number of instances and the number of Telnet terminals that can be connected simultaneously.
Instances = 10

If you want to configure a list of prohibited clients, add
No_access = 192.168.0. {2, 3, 4} # disable Logon of 192.168.0.2, 192.168.0.3, and 192.168.0.4

If you want to set an open time period, add
Access_times =-PM-# Only services are available for these two periods of time every day (our working hours: P)

If you have two IP addresses, one is a private IP address such as 192.168.0.2 and the other is a public IP address such as 218.75.74.83, if you want the user to log on to the Telnet service only from the private network, add
Bind = 192.168.0.2

 

Http://5158.blog.ccidnet.com/blog-htm-itemid-6307563-do-showone-type-blog-uid-41796.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.