ForwardingAgent を使用してサーバーからクライアントの github アカウントに変更をプッシュしようとしていますが、id_rsa_corevm ID が転送されません。
私の ~/.ssh/config ファイルにはこれがあります
Host corevm
Hostname 192.168.56.101
User user1
IdentityFile ~/.ssh/id_rsa_corevm
ForwardAgent yes
macbook-pro:.ssh macuser$ ssh-add -l
######## /Users/macuser/.ssh/id_rsa (RSA)
######## /Users/macuser/.ssh/id_rsa_corevm (RSA)
サーバーに ssh 接続して github への ssh 接続をテストすると、id_rsa_corevm ID が表示されますが、クライアントの github アカウントに接続できません。
[user1@corevm ~]$ ssh -t -vv git@github.com
debug2: key: /Users/macuser/.ssh/id_rsa (#####)
debug2: key: /Users/macuser/.ssh/id_rsa_corevm (######)
id_rsa_corevm ではなく、「Offering public key」が 1 つだけ表示されます。
debug1: Offering public key: /Users/macuser/.ssh/id_rsa
Hi githubuser! You've successfully authenticated, but GitHub does not provide shell access.
成功メッセージは、デフォルトの id_rsa ファイルが転送され、自分の github アカウントに接続できることを意味します。
次に、変更をクライアントの github にプッシュしようとすると、許可が拒否されます。
[user1@corevm test]$ git push origin master
ERROR: Permission to clientgithubuser/test.git denied to githubuser.
fatal: The remote end hung up unexpectedly
id_rsa.pub をクライアントの github アカウントに追加したいのですが、明らかに github ではキーの共有が許可されていません。
何か案は?