我在使用“net-ssh”gem从ruby通过ssh连接时遇到问题,得到Net::SSH::AuthenticationFailed。代码如下require'net/ssh'keys=["path_to_private_key"]Net::SSH.start('host','user',:keys=>keys,:verbose=>:debug)do|ssh|#sshcodeend直接从命令行使用ssh是可行的:ssh-iuser@host我的sshAPI有误吗?我已经尝试将“user@host”和“user”作为用户名,结果相同。这是调试输出:D,[2011-07-26T19:42