geeti
V2EX  ›  macOS

Mac OS X 用最新版 openssh 替代系统自带

  •  
  •   geeti · Aug 29, 2014 · 6780 views
    This topic created in 4276 days ago, the information mentioned may be changed or developed.
    最近用mavericks做server,无意中看了一眼openssh的版本,发现实在有点老。考虑到openssl的问题,还是更新一下比较好。
    系统自带:OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
    最新版openssh是:
    OpenSSH_6.6p1, OpenSSL 1.0.1i 6 Aug 2014

    用brew更新后,客户端就是最新的了。(把/usr/local/bin放到$PATH最前边)

    更新的目的是为了sshd的安全。但通过telnet localhost 22会发现,sshd依然是老版本。
    修改一下/System/Library/LaunchDaemon/ssh.plist:

    把里边的/usr/libexec/sshd-keygen-wrapper以及/usr/sbin/sshd 都更改为 /usr/sbin/sshd就可以了。(/usr/local/sbin/sshd可能需要自己link)
    然后重启sshd服务。(launchctl或者系统分享设置)

    最后更改一下/usr/local/etc/ssh/sshd_config
    把UsePrivilegeSeparation的值从sandbox改为yes
    3 replies    2014-08-29 12:29:20 +08:00
    ptyfork
        1
    ptyfork  
       Aug 29, 2014
    版本新不代表安全
    geeti
        2
    geeti  
    OP
       Aug 29, 2014
    @ptyfork openssl最近问题太多。
    semicircle21
        3
    semicircle21  
       Aug 29, 2014
    openssl 的问题和 openssh 有关系么?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   905 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 20:58 · PVG 04:58 · LAX 13:58 · JFK 16:58
    ♥ Do have faith in what you're doing.