Linux ssh-agent 代理失效

lb563 · May 24, 2012 · Last by huacnlee replied at May 24, 2012 · 2904 hits

我的需求是:

1: 开发机 A, 本地测试机 B, 远程服务器 C(具有 gitosis)

2: 现在用 A 登录到 B 并克隆 C 上的项目。

遇到的错误:

Permission denied (publickey,gssapi-with-mic). fatal: The remote end hung up unexpectedly

我处理的方法:

设置测试机的 ssh_config 文件,内容修改如下: Host * ForwardAgent yes

重启 sshd 服务

$ sudo /usr/sbin/sshd

在开发机上打开新的终端窗口登录到测试机,再次克隆服务器上的项目同样失败!

ps: 在我绝望的时候,重启电脑,打开一个新的终端窗口再次登录到测试机,克隆服务器上的项目,这次成功克隆. 而当我再打开一个新的终端窗口登录到测试机,克隆其它服务器上的项目时又失败了。

很不解,希望大家能分析一下是什么原因。

这个正文乱得... 另外看半天也没明白你在干啥

#1 楼 @huacnlee 我再整理整理。

你是在配置 Gitosis 吧?

You need to Sign in before reply, if you don't have an account, please Sign up first.