我有 2 个 Digital Ocean 实例,它们有私有 LAN IP。第一个是 10.130.30.82,第二个是 10.130.35.154。我可以从第一个实例 ping 第二个实例,但不能 SSH。我已使用 ssh-copy-id 将密钥复制到两个服务器,并且没有更改第二个服务器上的 sshd_config。我的本地计算机和两个服务器都是 ubuntu,
从第一个 SSH 进入第二个出现此错误:
/etc/ssh/ssh_config: line 11: Bad configuration option: hostkey
/etc/ssh/ssh_config: line 12: Bad configuration option: hostkey
/etc/ssh/ssh_config: line 13: Bad configuration option: hostkey
/etc/ssh/ssh_config: line 15: Bad configuration option: useprivilegeseparation
/etc/ssh/ssh_config: line 18: Bad configuration option: keyregenerationinterval
/etc/ssh/ssh_config: line 19: Bad configuration option: serverkeybits
/etc/ssh/ssh_config: line 22: Bad configuration option: syslogfacility
/etc/ssh/ssh_config: line 26: Bad configuration option: logingracetime
/etc/ssh/ssh_config: line 27: Bad configuration option: permitrootlogin
/etc/ssh/ssh_config: line 28: Bad configuration option: strictmodes
/etc/ssh/ssh_config: line 35: Bad configuration option: ignorerhosts
/etc/ssh/ssh_config: line 44: Bad configuration option: permitemptypasswords
/etc/ssh/ssh_config: line 63: Bad configuration option: x11forwarding
/etc/ssh/ssh_config: line 64: Bad configuration option: x11displayoffset
/etc/ssh/ssh_config: line 65: Bad configuration option: printmotd
/etc/ssh/ssh_config: line 66: Bad configuration option: printlastlog
/etc/ssh/ssh_config: line 74: Bad configuration option: acceptenv
/etc/ssh/ssh_config: line 76: Bad configuration option: subsystem
/etc/ssh/ssh_config: line 87: Bad configuration option: usepam
/etc/ssh/ssh_config: terminating, 19 bad configuration options
答案1
您已改变仅应在(注意)ssh_config
中使用的选项。sshd_config
d
它不断抱怨的文件是 SSH 客户端的配置,并且似乎来自源服务器而不是目标服务器。