在这样的例子中:
Host destination
ProxyCommand ssh gateway nc %h %p网关和目标之间的连接加密了吗?我很困惑,因为我有两个假设,两者都不能令人信服:
nc之前被解密,也就是说nc的stdin与stdin在源端的stdin相同。但我认为%p是22,ssh端口--这不符合这个假设。nc,而是执行cat,sshd守护进程是否也将加密的数据传递给它?听起来也不对。发布于 2015-07-27 20:28:56
当然是加密了!为了更好地了解这里发生的事情:
[ client $ ssh destination ]
|
'-> [ gateway $ nc destination 22 ]
|
'-> [ destination $ whatever]在客户端上,您只运行ssh destination。这被翻译成ssh gateway nc destination 22。
因此,第一个执行的命令是带有命令的ssh gateway。我们已经加密了第一步。
nc destination 22命令在此会话中在gateway服务器上运行。它基本上可以将所有I/O重定向到destination主机,就像它一样(但我们已经进入了加密通道!)
因此,您将再次使用destination进行密钥交换和身份验证,在成功之后,您可能会得到shell提示符。所以又被加密了。
https://stackoverflow.com/questions/31661959
复制相似问题