论坛管理
1753872 成员
7383 在线
108809 解答
新建帖子

在HPUX中限制用户使用telnet登陆

 
MINGJUNWANG8042
投稿人

在HPUX中限制用户使用telnet登陆

在HPUX中限制用户使用telnet登陆

 本文主要讲解在HPUX操作系统下禁止telnet的方法。希望大家喜欢。 1、在超级服务器中限制telnet登陆 # pwd /var/adm # cat inetd.sec # @(#)inetd.sec $Revision: 1.10.212.1 $ $Date: 95/10/12 19:28:29 $ # # # The lines in the file contain a service name, permission field and # the Internet addresses or names of the hosts and/or networks # allowed to use that service in the local machine. # The form for each entry in this file is: # # # # For example: # # login allow 10.3-5 192.34.56.5 ahost anetwork # # The above entry allows the following hosts to attempt to access your system # using rlogin: # hosts in subnets 3 through 5 in network 10, # the host with Internet Address of 192.34.56.5, # the host by the name of "ahost", # all the hosts in the network "anetwork" # # mountd deny 192.23.4.3 # # The mountd entry denies host 192.23.4.3 access to the NFS rpc.mountd # server. # # Hosts and network names must be official names, not aliases. # See the inetd.sec(4) manual page for more information. dtspc allow 127.0.0.1 hpux_55 spc allow 127.0.0.1 hpux55 mserve allow 127.0.0.1 hpux55 利用vi编辑,如果需要禁止某一个网段的用户登陆使用telnet,则编辑如下: #vi /var/adm/inetd.sec ... telnet deny 192.168.1.* 如果需要仅仅是某个网段的用户使用telnet,则如下 #vi /var/adm/inetd.sec ... telnet allow 192.168.1.* 2、限定telnet登陆,只允许使用console登陆。 #vi /etc/securetty console 这样,只能有在console上登陆。 3、临时解决办法 # ps -ef|grep telnet root 1060 551 0 15:00:06 ttyp1 0:00 telnetd root 1097 1061 7 15:23:56 ttyp1 0:00 grep telnet # kill -9 1060 好了,以上就是详细内容,希望大家喜欢,如果有什么问题,欢迎来信探讨。

1 条回复1
Kartik
论坛VIP会员

回复: 在HPUX中限制用户使用telnet登陆

FILES
      /etc/inetd.conf                  List of Internet server processes.
      /var/adm/inetd.sec            Optional security file.

      /etc/services                        associates   the port number and protocol the services use. 
     /etc/securetty                      限制root登陆,只能通过console登陆
1、禁止telnet服务端
a、注释 /etc/inetd.conf  telnet行
b、注释  /etc/services 中telnet的服务端口/协议
c、执行/usr/sbin/inetd -c
 
2、开启telnet服务端
a、反注释 /etc/inetd.conf  telnet行
b、反注释  /etc/services 中telnet的服务端口/协议
c、执行/usr/sbin/inetd -c
 
3、限制网段:
 vi /var/adm/inetd.sec