OS X 上的 sshd 和 -i 选项

OS X 上的 sshd 和 -i 选项

根据手册页sshd(8)

 -i      Specifies that sshd is being run from inetd(8).  sshd is normally
         not run from inetd because it needs to generate the server key
         before it can respond to the client, and this may take tens of
         seconds.  Clients would have to wait too long if the key was
         regenerated every time.  However, with small key sizes (e.g. 512)
         using sshd from inetd may be feasible.

我有点困惑该如何处理这个选项。在我使用的 Mac 上,Apple Launchdssh.plist包含该选项。但 Apple 不使用inetd(8) 密钥已经存在。

我应该-i在 OS X 上使用该选项吗?

答案1

磁盘上的文件是永久的主持人键,但手册正在谈论临时密钥交换键,用于实现前向保密

请注意,该消息专门针对 SSHv1,它使用在启动时和每小时重新生成的临时 RSA 密钥对。现代系统不再使用 SSHv1,因此该警告不再相关。

(SSHv2 使用DH 密钥交换相反,它每次交换都使用一个新密钥,但生成 DH 密钥对的速度要快得多,并且其他各种优势


是的,您仍应使用该选项。这是机制以 inetd 引入的方式和 launchd 使用的方式启动网络服务器。

(该机制有时称为“套接字激活”,可以在任何类 Unix 系统上实现,甚至在 Windows 上也有些困难。例如,Linux“systemd”通常也配置为使用“-i”启动 sshd。)

相关内容