Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
仅从ZeroTier网络内将Ssh连接到服务器_Ssh_Server_Zerotier - Fatal编程技术网

仅从ZeroTier网络内将Ssh连接到服务器

仅从ZeroTier网络内将Ssh连接到服务器,ssh,server,zerotier,Ssh,Server,Zerotier,我想: 1) ZeroTier网络中的所有设备都可以通过ZeroTier IP通过ssh相互连接 2) 没有来自网络外部的设备能够通过零层IP或标准公共IP通过ssh连接到网络 问题是,尽管我的设备在同一个ZT网络上,但我仍然可以通过公共IP ssh连接到这些设备。我如何防止这种情况 IP address for eth0: 104.xxx.xx.xxx (public IP) -> should not be able to ssh using this IP

我想:

1) ZeroTier网络中的所有设备都可以通过ZeroTier IP通过ssh相互连接

2) 没有来自网络外部的设备能够通过零层IP或标准公共IP通过ssh连接到网络

问题是,尽管我的设备在同一个ZT网络上,但我仍然可以通过公共IP ssh连接到这些设备。我如何防止这种情况

IP address for eth0:            104.xxx.xx.xxx (public IP) 
-> should not be able to ssh using this IP

IP address for ztxxxxxxxx:      10.xxx.xx.xx (ZeroTier IP)
-> should be able to ssh using this IP

非常感谢。

您需要将sshd进程绑定到zerotier提供给服务器的ip


按照此链接上的步骤操作:

嗨,维克,谢谢你的回答。问题是,我希望能够从ZeroTier网络内的任何设备而不是网络外的设备ssh到服务器。可能我需要将eth0重定向到tzXXX或者类似的东西。我已经更新了上面的问题。请原谅我的措辞不恰当。我想我现在有点晚了,但是你应该在“/etc/ssh/sshd_config”打开你的sshd配置,并用分配给该服务器的本地IP zerotier替换“ListenAddress 0.0.0”零,这将阻止从除zerotier 1之外的任何其他接口访问sshd。