ssh: sys_tun_open: /dev/tun0 open failed: No such file or directory 问题的解决
📌 TLDR
新 Mac 上 ssh -w 隧道报错 /dev/tun0 open failed: No such file or directory 的排错记录(浪费了 3 小时):Mac 上默认没有 tun 设备,得另外装驱动或改用别的转发方式;文中附了 ssh_config 里 Tunnel 参数的说明(yes / point-to-point / ethernet / no)。
记录一下纪念浪费的3个小时,在新的Mac上发现之前的tunnel脚本都不能用了,总是提示错误: …. sys_tun_open: /dev/tun0 open failed: No such file or directory …. Tunnel device open failed… Could not request tunnel forwarding…
对照了之前的笔记本,发现原来是不必要的把 /etc/ssh_config 里这行启用了: Tunnel yes
恢复成初始设置后恢复: # Tunnel no
Tunnel Request tun(4) device forwarding between the client and the server. The
argument must be "yes", "point-to-point" (layer 3), "ethernet" (layer 2), or
"no". Specifying "yes" requests the default tunnel mode, which is
"point-to-point". The default is "no".
💬 历史评论
以下 1 条评论从旧版 Movable Type 博客迁移而来。 原始评论时间:2002–2016 年。
小锋 · 2013-08-26 22:39
关于博主已久了,今天第一次留言,感觉博主的文章比一般的seo博客技术性高了许多,有点看不懂,呵呵,很希望以后能向大哥多多学习。