免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1115 | 回复: 3
打印 上一主题 下一主题

XDJM:帮个忙,关于HOSTS.ALLOW HOSTS.DENY [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-11-02 10:37 |只看该作者 |倒序浏览
  我初次接手维护SOLARIS系统,咋样实现HOSTS.ALLOW HOST.DENY的功能,不借助其它软件,愿闻详解。

论坛徽章:
0
2 [报告]
发表于 2004-11-02 13:47 |只看该作者

XDJM:帮个忙,关于HOSTS.ALLOW HOSTS.DENY

你想实现什么目的?

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
3 [报告]
发表于 2004-11-02 13:58 |只看该作者

XDJM:帮个忙,关于HOSTS.ALLOW HOSTS.DENY

是关于SSH的:
这个是官方文档
Description: Top

The sshd daemon that comes with the Solaris[TM] 9 Operating System uses TCP
(Transmission Control Protocol) Wrappers (also called "libwrap" to control
access to hosts. (Unlike other systems, Solaris 9 does not use the OpenSSH
keywords "AllowHosts" and "DenyHosts" to permit or prevent SSH [Secure
Shell] connections.)

TCP wrapper support is compiled into the sshd binary and sshd, which runs
as a standalone daemon. (Unlike other  services, the Solaris 9 Operating
System Secure Shell daemon is not under the control of inetd and tcpd.)

If sshd is running, and if the wrapper access control files are present
and correctly configured, you have all that you need to control host
access. This article explains how to do this.Document Body: Top

In this article controlling host access is a two-part process. First you
test the Solaris 9 Operating System Secure Shell functionality, and then
you activate the access control files. Follow these steps:

1. On the server running the sshd daemon, enter:

       sshd-server# mv /etc/hosts.allow /var/tmp/
       sshd-server# mv /etc/hosts.deny /var/tmp/

2. On a SSH client, enter:

       ssh-client$ ssh -l <login_name>; <target_ssh_server>;

If you have no problems with the two preceding steps, proceed. Otherwise,
you should troubleshoot your SSH functionality before you continue.

3. You will now grant access to the host with name "hostA," and deny
   access to all other hosts.  On the server running the sshd daemon,
   enter:

        sshd-server# echo "sshd : hostA" >; /etc/hosts.allow
        sshd-server# echo "sshd : ALL" >; /etc/hosts.deny

4. Next, you will test the allow access. On hostA, enter:

        hostA$ ssh -l <login_name>; <sshd-server>;  

   This should succeed.

5. Now test the deny access. On another host, enter:

         other_host$ ssh -l <login_name>; <sshd-server>;

   This should fail.

If your tests were successful, both sshd and the wrappers are working
correctly.

For  help configuring the access control files (/etc/hosts.allow and
/etc/host.deny) refer to the man pages. Enter:

# MANPATH=/usr/sfw/share/manMANPATH;export MANPATH
# man -s4 hosts_access

论坛徽章:
0
4 [报告]
发表于 2004-11-02 13:59 |只看该作者

XDJM:帮个忙,关于HOSTS.ALLOW HOSTS.DENY

你曾经回过这样一个帖:
http://bbs.chinaunix.net/forum/6/20040528/335515.html
我的要求一样。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP