github ssh-agent 超时 mediatemple

github ssh-agent timeout mediatemple

我正在尝试通过 git 从 mediatemple 服务器进行一些开发工作;我已经正确设置了我的 ssh 密钥,但我似乎遇到了 ssh-agent 问题。从下面的提示可以看出,设置好代理后,我就可以正常连接到git服务器了。但是,大约 15 分钟后,代理超时;那时我必须再次 运行 它并添加我的密钥。
有谁知道如何解决每次都需要这个?我已经尝试与 MT 开票并与他们的支持聊天,但他们并没有太大帮助...

15:04:03 login: ~ $ssh -T git@github.com
Permission denied (publickey).
15:04:26 login: ~ $ssh-add -l
Could not open a connection to your authentication agent.
15:04:33 login: ~ $eval "$(ssh-agent -s)"
Agent pid 19228
15:04:39 login: ~ $ssh-add ~/.ssh/id_rsa_github
Identity added: /home/215537/users/.home/.ssh/id_rsa_github (/home/215537/users/.home/.ssh/id_rsa_github)
15:04:47 login: ~ $ssh-add -l
4096 e4:26:3e:f0:33:d3:74:4c:2c:fe:9c:d8:e8:59:9a:53 /home/215537/users/.home/.ssh/id_rsa_github (RSA)
15:04:50 login: ~ $ssh -T git@github.com
Hi ConstantinoSchillebeeckx! You've successfully authenticated, but GitHub does not provide shell access.
15:17:28 login: ~ $ssh -T git@github.com
Permission denied (publickey).
15:17:36 meepmoop.com@n10: ~ $ssh-add -l
Could not open a connection to your authentication agent.
15:20:21 meepmoop.com@n10: ~ $eval "$(ssh-agent -s)"
Agent pid 26564
15:20:27 meepmoop.com@n10: ~ $ssh-add ~/.ssh/id_rsa_github
Identity added: /home/215537/users/.home/.ssh/id_rsa_github (/home/215537/users/.home/.ssh/id_rsa_github)
15:20:33 meepmoop.com@n10: ~ $ssh -T git@github.com
Hi ConstantinoSchillebeeckx! You've successfully authenticated, but GitHub does not provide shell access.

~/.ssh/config中使用ssh_config:

Host github.com
  IdentityFile ~/.ssh/id_rsa_github

然后你不需要任何代理。