Tag: ssh agent

如何在连接到现有的tmux会话时自动更新SSH代理环境variables

我试图find一个很好的方式来恢复SSH代理,当我重新连接断开tmux会话。 原因似乎是SSH代理会话更改,但tmux会话中的环境variables未更新。 如何在附加会话之前自动执行此操作? 因为我附加的会话并不总是有bash提示符,所以我不能在其中input内容。 在创build或附加tmux会话之前,它必须先运行。 我正在运行的代码示例是https://gist.github.com/ssbarnea/8646491 – 一个使用tmux创buildpersistem ssh连接的小型ssh包装器。 这工作得很好,但有时ssh代理停止工作,所以我不能再使用它连接到其他主机。

无法推送到git存储库 – 权限被拒绝

我有一个下面的问题: $ git push -u origin master Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. 我已经检查了这个连接: $ ssh -vT git@github.com 和输出看起来不错,我是正确的authentication。 在进一步检查时,我注意到: $ ssh-add -l The agent has no identities. 我试图运行ssh-agent,但没有改变: $ ssh-agent SSH_AUTH_SOCK=/tmp/ssh-A1mhFqvqncuO/agent.766; export SSH_AUTH_SOCK; SSH_AGENT_PID=767; export SSH_AGENT_PID; echo […]

SSH代理转发与Ansible

我使用Ansible 1.5.3和Git与ssh代理转发( https://help.github.com/articles/using-ssh-agent-forwarding )。 我可以login到我使用Ansiblepipe理的服务器,并testing我的连接到git的configuration是否正确: ubuntu@test:~$ ssh -T git@github.com Hi gituser! You've successfully authenticated, but GitHub does not provide shell access. 我也可以使用这个帐号克隆和更新我的回购协议中的一个,这样我的gitconfiguration看起来不错,当我通过ssh直接login到服务器时,使用ssh转发。 问题:当我使用Ansible命令模块尝试上面所示的相同testing时。 它以“权限被拒绝”失败。 Ansible输出的一部分(详细logging)如下所示: failed: [xxx.xxxxx.com] => {"changed": true, "cmd": ["ssh", "-T", "git@github.com"], "delta": "0:00:00.585481", "end": "2014-06-09 14:11:37.410907", "rc": 255, "start": "2014-06-09 14:11:36.825426"} stderr: Permission denied (publickey). 这里是运行这个命令的简单的手册: – hosts: webservers sudo: yes remote_user: […]

login时启动ssh-agent

我有一个网站作为远程Git仓库使用SSH别名从Bitbucket.com拉。 我可以在我的服务器上手动启动ssh-agent,但每次通过SSHlogin时都必须这样做。 我手动启动ssh-agent: eval ssh-agent $SHELL 然后我添加代理: ssh-add ~/.ssh/bitbucket_id 然后,当我这样做时,它显示出来: ssh-add -l 我很好走。 有什么方法可以自动化这个过程,所以我不必每次login时都这样做。 服务器运行RedHat 6.2(圣地亚哥)。

无法打开与身份validation代理的连接

我遇到了这个错误: $ git push heroku master Warning: Permanently added the RSA host key for IP address '50.19.85.132' to the list of known hosts. ! Your key with fingerprint b7:fd:15:25:02:8e:5f:06:4f:1c:af:f3:f0:c3:c2:65 is not authorized to access bitstarter. 我试图添加键,我得到这个错误如下: $ ssh-add ~/.ssh/id_rsa.pub Could not open a connection to your authentication agent.