Skip to content

Instantly share code, notes, and snippets.

@STAR-ZERO
Last active December 15, 2015 19:29
Show Gist options
  • Select an option

  • Save STAR-ZERO/5311165 to your computer and use it in GitHub Desktop.

Select an option

Save STAR-ZERO/5311165 to your computer and use it in GitHub Desktop.
"Received disconnect from hostname: 2: Too many authentication failures for username" の対処方法

原因

.sshに鍵の登録しすぎ

解決方法1

~/.ssh/configに次のように書く

Host hogehoge.com
  HostName fugafuga.com
  User hogo
  Port 12345
  IdentitiesOnly yes   ←重要
  IdentityFile ~/.ssh/id_rsa

解決方法2

$ ssh-add -D

のコマンドを実行

解決方法3

$ ssh -p xxxx -o IdentitiesOnly=yes -i ~/.ssh/xxxxx xxx@xxx.xxx.xxx.xxx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment