几个星期前sshlogin不再可能到远程的Mac。 Webmin升级到版本1.550和/或使用webmin更改设置时出现问题。
使用:* Mac OS X 10.6.5 + Webmin 1.550 + Virtualmin 3.66GPL
预期结果:使用sshlogin没有问题。
实际结果:ssh:连接到主机host.domain.tld端口22:操作超时
回归:经过更多的调查,看来:
$ sudo /usr/sbin/sshd -D -d -d -d -econfiguration为不分离时正确启动(-D) debug2:load_server_config:文件名/ etc / sshd_config debug2:load_server_config:done config len = 493 debug2:parse_server_config:config / etc / sshd_config len 493 debug3:/ etc / sshd_config:14设置协议2 debug3:/etc/sshd_config:30设置SyslogFacility AUTHPRIV debug3:/ etc / sshd_config:32设置LogLevel DEBUG3 debug3:/ etc / sshd_config:39设置MaxAuthTries 3 debug3:/ etc / sshd_config:108设置UseDNS no debug3:/ etc / sshd_config:111设置MaxStartups 5 debug3:/ etc / sshd_config:119设置子系统sftp / usr / libexec / sftp-server debug3:/ etc / sshd_config:121设置IgnoreRhosts yes debug3:/ etc / sshd_config:122设置IgnoreUserKnownHosts no debug3:/ etc / sshd_config:123设置PrintMotd yes debug3:/ etc / sshd_config:124设置StrictModes yes debug3:/ etc / sshd_config:125设置RSAAuthentication yes debug3:/ etc / sshd_config:126设置PermitEmptyPasswords no debug3:/ etc / sshd_config:127设置PasswordAuthentication yes debug3:/ etc / sshd_config:128设置DenyGroups deniedssh debug3:/ etc / sshd_config:129设置PubkeyAuthentication yes debug3:/ etc / sshd_config:130设置GatewayPorts no debug3:/ etc / sshd_config:131设置AllowTcpForwarding yes debug3:/ etc / sshd_config:132设置KeepAlive yes debug1:sshd版本OpenSSH_5.2p1 debug3:不是RSA1密钥文件/ etc / ssh_host_rsa_key。 debug1:读取完成的PEM私钥:键入RSA debug1:专用主机密钥:#0 type 1 RSA debug3:不是RSA1密钥文件/ etc / ssh_host_dsa_key。 debug1:读取完成的PEM私钥:键入DSA debug1:私有主机密钥:#1types2 DSA debug1:rexec_argv [0] ='/ usr / sbin / sshd' debug1:rexec_argv [1] =' - D' debug1:rexec_argv [2] =' - d' debug1:rexec_argv [3] =' - d' debug1:rexec_argv [4] =' - d' debug1:rexec_argv [5] =' - e' debug2:fd 3设置O_NONBLOCK debug1:绑定到::上的端口22。 服务器监听::端口22。 debug2:fd 4设置O_NONBLOCK debug1:在0.0.0.0上绑定到端口22。 服务器在0.0.0.0端口22上侦听。 debug1:fd 5清除O_NONBLOCK debug1:在debugging模式下运行时服务器不会分叉。 debug3:send_rexec_state:inputfd = 8 config len 493 debug3:ssh_msg_send:input0 debug3:send_rexec_state:完成 debug1:rexec开始5 out 5 newsock 5 pipe -1 sock 8 debug3:recv_rexec_state:inputfd = 5 debug3:ssh_msg_recv进入 debug3:recv_rexec_state:done debug2:parse_server_config:config rexec len 493 debug3:rexec:14设置协议2 debug3:rexec:30设置SyslogFacility AUTHPRIV debug3:rexec:32设置LogLevel DEBUG3 debug3:rexec:39设置MaxAuthTries 3 debug3:rexec:108设置UseDNS no debug3:rexec:111设置MaxStartups 5 debug3:rexec:119设置子系统sftp / usr / libexec / sftp-server debug3:rexec:121设置IgnoreRhosts yes debug3:rexec:122设置IgnoreUserKnownHosts no debug3:rexec:123设置PrintMotd yes debug3:rexec:124设置StrictModes yes debug3:rexec:125设置RSAAuthentication yes debug3:rexec:126设置PermitEmptyPasswords no debug3:rexec:127设置PasswordAuthentication yes debug3:rexec:128设置DenyGroups deniedssh debug3:rexec:129设置PubkeyAuthentication yes debug3:rexec:130设置GatewayPorts no debug3:rexec:131设置AllowTcpForwarding yes debug3:rexec:132设置KeepAlive yes debug1:sshd版本OpenSSH_5.2p1 debug3:不是RSA1密钥文件/ etc / ssh_host_rsa_key。 debug1:读取完成的PEM私钥:键入RSA debug1:专用主机密钥:#0 type 1 RSA debug3:不是RSA1密钥文件/ etc / ssh_host_dsa_key。 debug1:读取完成的PEM私钥:键入DSA debug1:私有主机密钥:#1types2 DSA debugging1:inetd套接字后:3,3 debug3:BSM审计:来自1.1.1.247端口53137的连接 debug3:BSM审计:iptype 4机器ID 010101d9 00000000 00000000 00000000 连接从1.1.1.247端口53137
一个成功的连接如下…
$ sudo /usr/sbin/sshd -i -d -d -d -e debug2:load_server_config:文件名/ etc / sshd_config debug2:load_server_config:done config len = 493 debug2:parse_server_config:config / etc / sshd_config len 493 debug3:/ etc / sshd_config:14设置协议2 debug3:/etc/sshd_config:30设置SyslogFacility AUTHPRIV debug3:/ etc / sshd_config:32设置LogLevel DEBUG3 debug3:/ etc / sshd_config:39设置MaxAuthTries 3 debug3:/ etc / sshd_config:108设置UseDNS no debug3:/ etc / sshd_config:111设置MaxStartups 5 debug3:/ etc / sshd_config:119设置子系统sftp / usr / libexec / sftp-server debug3:/ etc / sshd_config:121设置IgnoreRhosts yes debug3:/ etc / sshd_config:122设置IgnoreUserKnownHosts no debug3:/ etc / sshd_config:123设置PrintMotd yes debug3:/ etc / sshd_config:124设置StrictModes yes debug3:/ etc / sshd_config:125设置RSAAuthentication yes debug3:/ etc / sshd_config:126设置PermitEmptyPasswords no debug3:/ etc / sshd_config:127设置PasswordAuthentication yes debug3:/ etc / sshd_config:128设置DenyGroups deniedssh debug3:/ etc / sshd_config:129设置PubkeyAuthentication yes debug3:/ etc / sshd_config:130设置GatewayPorts no debug3:/ etc / sshd_config:131设置AllowTcpForwarding yes debug3:/ etc / sshd_config:132设置KeepAlive yes debug1:sshd版本OpenSSH_5.2p1 debug3:不是RSA1密钥文件/ etc / ssh_host_rsa_key。 debug1:读取完成的PEM私钥:键入RSA debug1:专用主机密钥:#0 type 1 RSA debug3:不是RSA1密钥文件/ etc / ssh_host_dsa_key。 debug1:读取完成的PEM私钥:键入DSA debug1:私有主机密钥:#1types2 DSA debugging1:inetd套接字后:3,4 debug3:BSM审计:从UNKNOWN端口65535连接 BSM审计:getaddrinfo失败UNKNOWN:节点名或服务器名提供,或不知道 debug3:BSM审计:iptype 0机器ID 00000000 00000000 00000000 00000000 来自UNKNOWN端口65535的连接 SSH-2.0-OpenSSH_5.2
没有连接可以build立。
任何build议在哪个方向寻找修复?
使用initd在Mac上启动任何东西都是非常不标准的。 相反, launchd被使用,以特别的方式launchd sshd (也就是说,它不会作为典型的服务器守护进程运行,直到敲门)。 我怀疑你使用以Linux为中心的Webminpipe理ssh是造成这个问题的原因,因为Webmin对launchd一无所知。
首先,确保ssh launchd项目被configuration为加载,只是为了消除明显。
sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist
这类似于在Settings(设置)选项中勾选Server Admin.app中的方框来启用SSH。 检查syslog,看看launchctl是否在抱怨什么。
目前还不清楚为什么你要Webmin来处理SSH,但苹果的默认configuration可能是照亮的。
/System/Library/LaunchDaemons有一个启动项目sshd.plist。 这个XML文件表明/usr/libexec/sshd-keygen-wrapper被用作使用-i标志实际启动/usr/sbin/sshd的“程序”。 ( sshd-keygen-wrapper程序是一个shell脚本,首先在空的用户家目录中设置初始的rsa和dsa键)。然而,sshd-keygen-wrapper也像exec /usr/sbin/sshd $@这样启动了sshd exec /usr/sbin/sshd $@就sockets防火墙而言,它是一个受信任/列入白名单的程序。
您可能还希望从备份或其他计算机获取默认的/etc/sshd_config ,以将其作为故障排除中的variables。