我同意,您必须使用 bind_all 选项执行:
tensorboard --logdir dir/ --port 6006 --bind_all
但是,也许在您的情况下,您只需要检查ssh_gateway_machine ssh 服务器是否配置为允许端口转发:AllowTcpForwarding yes?
这里的解释:
例子:
ssh user@ssh_gateway_machine
sudo -i
vi /etc/ssh/sshd_config
如果可能(询问您公司的 IT 安全人员),请编辑行:
AllowTcpForwarding yes
但在我的情况下,我不得不创建一个 ssh 远程端口转发 -R 选项,而不是在本地执行(在 remote_machine 上),因为我无法从互联网直接访问 @ 的任何端口987654332@网络。
所以,我认为我的-R 远程端口转发方法更好,如果您的remote_machine 可以访问互联网并且您可以安装/激活 ssh 服务器(在 NAS 上或在您的 local_machine 上)。
所以,我再说一遍,它是通过在remote_machine 上执行的-R 选项完成的。
因此,ssh_gateway_machine 变为本地(例如 Synology NAS)。
如果您没有 NAS,如果您安装/激活 SSH 服务器,它可能是您的local_machine。 (ssh_gateway_machine == local_machine)
并且您必须修改您的互联网提供商框/网络路由器的端口转发)以将 ssh 传入端口转发到您的内部 ssh_gateway_machine(以便能够通过您的互联网提供商框从互联网传入访问到您的 @987654343 @。
您必须在ssh_gateway_machine (Synology NAS)、GatewayPorts 和AllowTcpForwarding 选项中检查和修改服务器 ssh 配置:
ssh user@ssh_gateway_machine
sudo -i
vi /etc/ssh/sshd_config
编辑行:
GatewayPorts yes
AllowTcpForwarding yes
另外,不要忘记修改ssh_gateway_machine 的防火墙规则以仅接受来自remote_machine 公共IP 的ssh 传入访问。
也许它也可以在您的互联网路由器上完成。
之后,你必须从remote_machine执行:
ssh user@ssh_gateway_machine_public_ip -R 6006:localhost:6006
ssh_gateway_machine_public_ip = local_machine_public_ip = internet_box public_ip
网络图片:
My network map