电信宽带是公网 ip,我映射 8888 到内网某 ubuntu 的 80 端口,公网访问成功;映射其他端口(2222, 8889)到 22(局域网是可以 ssh 的),为什么 ssh 登录不成功呢

2018-08-08 17:13:03 +08:00
 twor
1817 次点击
所在节点    问与答
3 条回复
jasonyang9
2018-08-08 17:34:24 +08:00
第一反应难道不是看日志么?

```
grep 'sshd' /var/log/auth.log
```
wuyamao
2018-08-08 22:09:35 +08:00
电信光猫上有 iptables 防火墙,可能过滤了 22 端口,把 ssh 端口改成其他试试
twor
2018-08-08 22:32:54 +08:00
@wuyamao 我把 http 服务关闭,把 sshd 的端口改成 80,路由器上对外的端口改成 8888 (端口设置跟原先可以正常工作的 http 服务一致)

@jasonyang9
Aug 8 14:21:15 sshd[6322]: Bad protocol version identification 'GET / HTTP/1.1' from 96.126.x.x port 20014
Aug 8 14:21:27 sshd[6326]: Did not receive identification string from 96.126.x.x port 20016

看不懂,回去查查资料

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/478010

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX