我正在寻找一种通过 SSH 进行 SSH 的方法(如标题所示)。
所以,我知道我可以做到:
ssh -t user1@proxyServer ssh user2@farAwayServer
或者我可以将 ProxyCommand 与 一起使用nc
,但我不想通过连接到每个 farAwayServer 来使用到 proxyServer 的一个连接。而且我知道我可以使用ControlMaster
,但我对这个解决方案也不是很满意。
我更喜欢类似的东西:
ssh -t -Dlocalhost:2222 user1@proxyServer
ssh (something to use the localhost:2222) user2@farAwayServer
这个解决方案是否存在,如果是,如何?
谢谢你的帮助