macos 在 OSX 上管理 ssh 隧道的好工具

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7190207/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 08:21:10  来源:igfitidea点击:

Good tool to manage ssh tunnels on OSX

macossshtunnel

提问by Paul Jacobse

I'm looking for a good tool to manage ssh tunnels. Currently I'm using SSHTunnel (cocoa-sshtunnel) but its not very secure, if you look at a pswhile connected you see the password in plaintext. And there is no way to configure a private key file per connection.

我正在寻找一个很好的工具来管理 ssh 隧道。目前我正在使用 SSHTunnel (cocoa-sshtunnel) 但它不是很安全,如果您查看ps连接一段时间,您会看到明文密码。并且无法为每个连接配置一个私钥文件。

I also tried STM (http://projects.tynsoe.org/en/stm/index.php) however you cannot save your passwords, and also no private key option.

我也试过 STM (http://projects.tynsoe.org/en/stm/index.php) 但是你不能保存你的密码,也没有私钥选项。

I'm working on osx Snow Leopard. I use the tunnels for Remote port forwarding. I have a local SVN server for website development, and checkout remotely. I cannot forward ports as I don't have access to the router.

我正在研究 osx Snow Leopard。我使用隧道进行远程端口转发。我有一个本地 SVN 服务器用于网站开发和远程结帐。我无法转发端口,因为我无权访问路由器。

What tools do you use?

你使用什么工具?

回答by timbrown

SSH Tunnel Manager- This tool is great!

SSH 隧道管理器- 这个工具很棒!

回答by Geoffrey Wiseman

I wrote my own tool for this, Tunnel Boring Machine. It doesn't store passwords, but it works fine with SSH keys in ~/.ssh, which is how I use it.

我为此编写了自己的工具Tunnel Boring Machine。它不存储密码,但它可以与 ~/.ssh 中的 SSH 密钥一起正常工作,这就是我使用它的方式。

It's possible that I'll get around to password storage at some point -- if you end up finding that TBM works for you but is missing some key feature like password storage, feel free to file an issue on GitHub, or, for that matter, implement it and send me a pull request.

我可能会在某个时候开始使用密码存储——如果你最终发现 TBM 适合你,但缺少密码存储等关键功能,请随时在 GitHub 上提交问题,或者就此而言,实施它并向我发送拉取请求。

回答by Xtroce

you should use the console and normal ssh for tunneling, at least thats what i always do. here a small introduction on how to use it. password saving is indeed something that doesn't work there but i always used keys anyway so you don't have to enter a password anymore

您应该使用控制台和普通的 ssh 进行隧道传输,至少这是我经常做的。这里是一个关于如何使用它的小介绍。密码保存确实在那里不起作用,但我总是使用密钥,所以你不必再输入密码了

ssh tunnel from console:

来自控制台的 ssh 隧道:

http://www.revsys.com/writings/quicktips/ssh-tunnel.html

http://www.revsys.com/writings/quicktips/ssh-tunnel.html

login with authkeys:

使用 authkeys 登录:

http://linuxproblem.org/art_9.html

http://linuxproblem.org/art_9.html

this is both for linux and bsd but should work on mac os too, i remember using it there maybe some option has another shortcut, if it doesn't work look at man ssh

这适用于 linux 和 bsd,但也适用于 mac os,我记得使用它,也许某些选项有另一个快捷方式,如果它不起作用,请查看 man ssh

*EDIT

*编辑

if you need a gui (comment) try jellyfissh seems it can do what you need

如果你需要一个 gui(评论)试试 jellyfishsh 似乎它可以做你需要的

http://www.m-works.co.nz/jellyfissh.php

http://www.m-works.co.nz/jellyfissh.php

回答by MOK9

I use Terminal for this and it works very well. You could create a shell script for your colleagues that sets up the tunnels with their username as an argument. That should be simple enough for them to run? For example:

我为此使用终端,并且效果很好。您可以为您的同事创建一个 shell 脚本,以他们的用户名作为参数设置隧道。那应该足够简单让他们运行了吧?例如:

#!/bin/sh
username=
servdest=ssh.yoursshserver.com
ssh -l ${username} -L 7777:${servdest}:7777 -L 2112:wiki.elsewhere.net:80 ${servdest}