Как я могу использовать несколько прыжков (например, через туннель или ProxyCommand)?

2316
d3vid

У меня есть система, к которой я могу получить доступ только через несколько входов SSH. Недавно я узнал об использовании ProxyCommand или SSH-туннелей для прозрачного соединения. Можно ли вместо этого mosh, и если да, то как?

7
см. также http://serverfault.com/q/390916/80866 Janus Troelsen 8 лет назад 0

1 ответ на вопрос

5
d3vid

This is achievable if you can mosh onto the first hop server which itself provides a (transparent) regular SSH connection to the end point. [1] You can configure the first-hop to endpoint connection via any means available. I think this would solve my use case of simply wanting to use mosh's lag-friendly interface from my end.

It is also possible in theory to use a UDP packet repeater such as stone or socat on the intermediary servers. However, experiments in this regard have been only partially successful. [2]

(Thanks to Vincent Lefevre and Mark Stillwell for their answers to my repost on the mosh-users mailing list.)

[1] http://mailman.mit.edu/pipermail/mosh-users/2014-March/000247.html

[2] See https://serverfault.com/questions/390916/mosh-tunnel-via-proxy for the suggestion, http://mailman.mit.edu/pipermail/mosh-users/2014-March/000248.html for discussion and http://mailman.mit.edu/pipermail/mosh-users/2014-March/000250.html for a sample script.

The script is also on Github: https://github.com/marklee77/mosh-proxy