解决 ssh 创建连接极慢的问题
六月 18th, 2008
做 Web 开发的工作经常需要 ssh 或者 scp 连接一堆远程主机,同样是 Linux 主机,其中一些创建 ssh 连接速度特别慢,连接建立之后执行操作速度却很正常,看来应该不是网络原因。
Google 了一下,这位老兄也遇到类似的问题,看完他描述的问题才知道可以用 ssh -v 来查看详细的连接建立过程,马上用一台建立连接很慢的主机试了一下,在一大堆输出信息中发现在这里停留最久:
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure. Minor code may provide more information
No credentials cache found
debug1: Unspecified GSS failure. Minor code may provide more information
No credentials cache found
debug1: Unspecified GSS failure. Minor code may provide more information
debug1: Next authentication method: publickey
原来是因为尝试了个没有意义而且会失败的 gssapi-with-mic 认证方式浪费了时间,打开 /etc/ssh/ssh_config 把里面的 GSSAPIAuthentication yes 改成 no 关掉它,即可让 ssh 直接尝试美妙的 publickey 认证方式。
禁用 GSSAPIAuthentication 前后建立 ssh 连接时间的对比:
rainux@mutalisk:~$ time ssh root@i-will-not-tell-you.com exit
real 0m18.488s
user 0m0.004s
sys 0m0.008s
rainux@mutalisk:~$ time ssh root@i-will-not-tell-you.com exit
real 0m3.531s
user 0m0.016s
sys 0m0.000s
Tags: GNU/Linux, Software 软件, ssh六月真是个好时节啊
六月 5th, 2008
Ruby 1.8.7 和 Rails 2.1.0 前两天相继发布。Firefox 3.0 昨天进入 rc2 阶段,并且将在六月中旬发布 3.0 正式版。开发了十五年的 Wine 终于进入 1.0 的 rc 阶段,并且即将发布 1.0 正式版。
看来是时候更新 SCV Selector 了,可惜预想了很久的 rep 版本识别还是没有时间去研究……
Tags: Software 软件, Web Development 织网最近需要测试 Flash 内容,搜到了这个很简单的办法,原文是针对 etch 的,对于 lenny 来说更简单,官方仓库里已经有 nspluginwrapper 了,直接 apt 安装即可。
aptitude install nspluginwrapper
然后在自己的账户(非 root 账户)里下载 Adobe 的 flash player 并使用 nspluginwrapper 安装为 Iceweasel/Firefox 的插件即可。
wget http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_9_linux.tar.gz
tar -zxf install_flash_player_9_linux.tar.gz
mkdir ~/.mozilla/plugins/
mv install_flash_player_9_linux/libflashplayer.so ~/.mozilla/plugins/
nspluginwrapper -i ~/.mozilla/plugins/libflashplayer.so
# Start/restart iceweasel/firefox/whatever
Tags: GNU/Linux, Software 软件很爽的 Rails CHM Documentation 2.0.2
五月 30th, 2008
delynn 老兄终于发布了他的 Rails CHM Documentation 的 2.0.2 版,再也不用忍受 RailsBrain.com 那个 Rails API with the AJAX flavor 糟糕的目录结构了。
网上流传的所有 Rails 文档都是用 rdoc 从 Rails 源代码里的 RDoc 注释自动生成的,内容都完全一样。但只有这位 delynn 老兄的 Rails CHM Documentation 目录是手工整理的,按照 Module 分类,结构非常清晰。
Tags: Ruby on Rails