通过第三台机器的 SVN-SSH 隧道?
我有一个设置了 SVN+SSH 的客户端,我需要访问它。不幸的是,我无法将我的 IP 列入白名单,因为我在 Comcast,他们有一些针对此的安全策略。然而,我确实可以通过 SSH 访问另一台机器,我可以通过 SSH 连接到该机器,也可以通过 SSH 连接到 SVN 服务器(通过非标准端口)...所以总循环需要如下所示:
Local Computer (OSX) --SSH--> Server1 --SVN+SSH_4567--> SVN Server
我知道如何设置基本的 SSH 隧道,但我不确定如何设置它,或者是否可能。帮助? :)
请注意,理想情况,我可以在 ~/.ssh/config
和 ~/.subversion/config
中以某种方式设置它,而不需要每次我想要提交/更新时,手动从 A->B->C 建立隧道
I have a client that has SVN+SSH set up that I need to access. Unfortunately I can't get my IP white-listed because I'm on Comcast and they have some security policy against that. I do, however, have SSH access to another machine that I can SSH into that can also SSH into the SVN server (via a non-standard port)... So the total loop needs to look like:
Local Computer (OSX) --SSH--> Server1 --SVN+SSH_4567--> SVN Server
I know how to set up basic SSH tunnels, but I'm not sure how to set this up, or if it's even possible. Help? :)
Note that ideally, I can set this up somehow in ~/.ssh/config
and ~/.subversion/config
and not have to manually tunnel from A->B->C each time I want to make a commit/update
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
隧道连接将是
要自动化此操作,您可以将隧道连接添加到
~/.subversion/config
:然后使用
svn+tssh://localhost/path/to/repo< /code> 但我不知道自动创建隧道的方法。
The tunneled connection will be
To automate this somewhat you can add the tunnel connection to
~/.subversion/config
:and then use
svn+tssh://localhost/path/to/repo
but I don't know of a way to automate creating the tunnel.打开与
Server1
的 SSH 会话并在该会话中设置隧道:PS。您可能需要检查 ssh
man
页面的语法。我不记得打开隧道的正确标志。然后在本地,使用 svn+ssh://localhost:9000 连接到服务器
Open SSH session to
Server1
and setup tunneling in that session:PS. You might want to check the ssh
man
page for syntax. I don't remember the correct flags to open a tunnel.And then locally, you connect to the server using
svn+ssh://localhost:9000