Mac OS 下一个轻量级 SSH 代理小软件 - SimpleSSHProxy 九月 14th, 2010
SimpleSSHProxy 已经更新了!点击查看!
由于某些特殊的原因,我们需要使用 SSH 代理来访问一些网站。在 Windows 下有 myEnTunnel 等管理 SSH 的小软件,而在 Linux 和 Mac OS 下,系统一般已经自带了 OpenSSH 客户端,所以可以直接在终端命令行下来进行 SSH 的连接。但是不是所有人都喜欢在键盘上敲命令的,而且用 SSH 作为代理使用也有一些缺点,比连接空闲一段时间会自动断线。当然你可以用 autossh 这个工具,但是 autossh 也有它办不到的事情。所以我做了一个小软件,即 SimpleSSHProxy,顾名思义,是一个简单的 SSH 代理管理小软件,它有以下特点:
- 小巧,整个软件和源代码的压缩包才200多KB。
- 使用方便,软件显示为菜单栏图标和下拉菜单,无 Dock 图标,不会对你的工作界面产生干扰。
- 简洁,仅提供与代理相关的一些参数设置,不会另人感到困扰。
- 功能完善,可以提供 Socks 和 HTTP 代理,满足不同的需求。可以为其他电脑提供代理。支持通过 autossh 来自动管理 SSH 连接,在使用密码验证的情形下也能提供类似 autossh 的连接保持、掉线检测和重连功能。详细实现方法见这篇文章。


一些说明:软件的实现其实很简单,通过后台调用 polipo 来实现 HTTP 代理,调用 autossh 或一个 expect 脚本来连接 SSH。设置选项上,相信用过 SSH 代理的同学一看就知道怎么设置了,需要说明的就两点,“为其他电脑提供代理”,选中后,如果你的局域网中有其他电脑或设备,只需将代理设置为本台电脑的 IP 和相应端口,就可以使用 SimpleSSHProxy 提供的代理了。“使用密码”选项,我已经提到过了,autossh 对使用密码的 SSH 认证无法很好的支持,但是 autossh 的连接管理特性又十分方便,所以,如果你使用的是 SSH 密钥验证方式,就不用选择“使用密码”,软件就会调用 autossh。如果你不得不使用密码验证,软件会调用一个 expect 脚本来连接 SSH,同样可以提供类似 autossh 的断线重连等功能。当然还是推荐大家设置 SSH 的密钥认证,具体设置方法请自行搜索。如果你实在懒得设置密钥或者服务器比较特殊,只支持密码验证,那就没的选了。我也打算在软件的后续版本中提供一键设置 SSH 密钥的功能来方便大家,你也可以等一等~
SimpleSSHProxy 是我初学 Objective-C/Cocoa 的第一个小作品,现在也仅仅是半成品阶段,欢迎大家测试,对软件有什么意见或建议尽管提出来。至于发布许可证什么的,我也懒得弄了,软件和代码大家随意传播和使用,当然,如果你在传播时能稍微提一下我和这篇文章,那真是感激不尽了~
SimpleSSHProxy 目前的版本为 Pre-release rev3.2,源码和软件点此下载
PS:差点忘了,感谢国家
我是“使用密码”的。但我发现设置自动连接后,并不会自动开始,而要手动才可以。并且貌似断线后连接不太管用,是否可以推出日志模式的?
To Joe:
你好,可以从 实用工具-控制台 中查看 SimpleSSHProxy 的输出信息。
哇,终于有一个轻量级的ssh代理软件了...之前用了好多个都非常不好用...希望作者能继续更新下去~~
试了下,结果竟然不能用...=.=看来还是得继续用Secret Socks去...=.=
请问非标准端口(比如SSH默认端口为22,我要登录这台服务器的为8080)是按照什么格式填进去?我用类似 apple.com:22 这种格式结果失败了,用Secret Socks正常(它有填端口的地方)
改autossh.sh里的ssh -D 那句后面加上一个 -p 8080 就行了,现在成功翻越,爽啊,这小东西真方便,谢谢!
非常不错!
v class="hft-lines">,Cheap NBA Hats
Australia is one of the world's most sought after destinations for both holiday-makers and prospective migrants alike. The picturesque beaches, cultural hot-spots, relaxed culture and fantastic climate draw in millions of people from around the world every year. However despite the country's unending charm, migrating to Australia without any assistance or support can be difficult,
Find Out Why You Want to Bargain When You Travel in Foreign Countries! - free ar
, confusing,NBA Basketball Hats, and often frustrating. Thankfully,Cheap Monster Energy hats, there are many registered migration agents around that can ease the whole migration process,http://www.cheapnikenfljerseys.net, and help you with things you never even thought of - like where your kids will go to school, or what job you will have? Where will you live? What about banking,Famous Stars hats, passports,
Wholesale NCAA Hats Holidays are Inn Share the Tra
, and all the legal stuff? Speaking to a migration services expert will put everything in perspective for you and guarantee your life in Australia is perfectly planned.
Firstly,
Tampa Bay Buccaneers Jersey About us Lart Softtech
, and perhaps most importantly, you will need to be clear about where you will work. They call Australia the lucky country - but finding a job is always a time-consuming task. If you are trained and experienced in areas which Australia has a skills shortage,Wholesale New Era hats, this could be a huge advantage. Registered migration agents can help you with the whole employment process, by matching your skills to current shortages in the Australian workforce, and landing you a job. Using expert migration services can even guarantee you a job, before you set foot in the country! Best of all, your migration services expert will handle all of the negotiating and form-filling,cheap New Era Jordan Hats, giving you the best possible employment conditions.
Next,Jordan Hat, you will need to organise the right Visa. Registered migration agents know all the Australian visas, including what is required to obtain them. They can advise you on which visa is best for you,wholesale NBA 59fifty Hat, help you apply for it, and then liaise with the Australian Department of Immigration and Citizenship (DIAC) on your behalf. If you apply for a job using migration services, you may be eligible for a special Employer Sponsored Visa,Wholesale DC Hats, or the Employer Nominated Scheme - both of which allow you to come to Australia funded by your new employer. Every Visa is different, and the differences are often very small and confusing. Migration law is extremely complex and is constantly being updated and influenced by changes to immigration legislation. Instead of trying to understand how the Australian system functions,http://www.cheapnewerahat.org, the best thing to do is seek guidance and advice from a registered migration agent on which Visa is suitable for your needs.
It is also vital that you gain a good understanding of Australia's healthcare system and available medical services. Australia has quite a good healthcare reputation, which is important for the quality of you and your family's life. Australia also has bulk-billing services and a Medicare system which offers free or reduced rate medical services and prescriptions to most Australians. However, private health care is encouraged as the system is under-funded and overpopulated.Your registered migration agent will be able to provide you with information and advice on any questions you may have about Australia's healthcare system.
About The Author
Registered migration agents make your migration to Australia easy! To find out more, visit
The author invites you to visit:
Article Source:</strong