V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
wanghualang
V2EX  ›  Linux

请教 Linux 编译安装 Openssh7.9 如何支持 TCP Wrappers?

  •  
  •   wanghualang · 2019-01-22 17:46:45 +08:00 · 3058 次点击
    这是一个创建于 1914 天前的主题,其中的信息可能已经有所发展或是发生改变。
    查阅了官方文档,OpenSSH 6.6 之后便不再支持 TCP Wrappers。最近在装有 CentOS6.8 的工作站上编译了最新的 OpenSSH7.9,现在还是希望使用 hosts.allow、hosts.deny 的方式来限制网络访问 SSH,其他限制手段我会,暂不讨论。请问如何编译才能让新版 OpenSSH 支持 TCP Wrappers ?

    相关命令:
    # ldd /usr/sbin/sshd | grep libwrap

    PS:CentOS7 默认为 OpenSSH 7.4,通过 yum 安装的版本是支持 TCP Wrappers 的,也查看过 OpenSSH7.4 的 rpm_src 包,但还是没弄懂,谢谢大家。
    3 条回复    2019-01-28 17:22:41 +08:00
    julyclyde
        1
    julyclyde  
       2019-01-25 16:42:20 +08:00
    configure 的时候没看到 with 选项吗?
    wanghualang
        2
    wanghualang  
    OP
       2019-01-26 13:26:36 +08:00
    @julyclyde
    http://www.openssh.com/releasenotes.html
    OpenSSH 6.7/6.7p1 Changes:Support for tcpwrappers/libwrap has been removed.

    [root@RHEL openssh-6.6p1]# ./configure --help | grep with-tcp-wrappers
    --with-tcp-wrappers[=PATH] Enable tcpwrappers support (optionally in PATH)

    [root@RHEL openssh-7.9p1]# ./configure --help | grep with-tcp-wrappers
    [root@RHEL openssh-7.9p1]#

    SSH 官方说 6.6 之后版本不支持 tcp-wrappers,但 CentOS7.6 自带的 OpenSSH7.4p1 版本是可以支持 tcp-wrappers,所以想知道这是如何实现的,并希望通过自行编译升级 OpenSSH 7.9 的时候恢复这个功能。
    julyclyde
        3
    julyclyde  
       2019-01-28 17:22:41 +08:00
    把 redhat 的补丁拿过来用用
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2871 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 09:14 · PVG 17:14 · LAX 02:14 · JFK 05:14
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.