2014-05-05 56 views
0

我試圖ssh到github使用不同的私鑰比我原來的一個。這似乎是ssh請求被莫名其妙緩存,因爲無論我做什麼,當我打電話ssh -T [email protected],它說更改github用戶/私鑰

高[錯用戶]您已成功驗證...

我已經嘗試在做各種各樣的事情:

  • 刪除從我.gitconfig
  • github.useruser.email刪除我的id_rsa完全
  • 使用ssh -i用不同的身份文件,包括無效身份文件
  • 更新我.ssh/config

Host github.com 
    HostName github.com 
    User git 
    IdentityFile /path/to/private/key/for/right-user 

無論什麼好像我總是從github登錄到t的響應他錯了用戶。

有什麼我可以做的告訴github使用不同的用戶/私鑰進行身份驗證?

回答

1

您可以使用ssh-add -l來檢查緩存的ssh密鑰。

您可以使用ssh-add -D刪除所有緩存的密鑰。