から離れたルートのものを含む、ユーザーのauthorized_keysの場所を変更し/<user>/.ssh
ました/abc/%u
。
[root@server]# grep AuthorizedKeysFile /etc/ssh/sshd_config
#AuthorizedKeysFile .ssh/authorized_keys
AuthorizedKeysFile /abc/%u
ただし、ssh-copy-id は、リモート サーバーからのその情報を使用しないようで、代わりに、以下のスナップショットで提案されているように、常に「.ssh/authorized_keys」にコピーします。/abc/%u
サーバー上の AuthorizedKeysFile が指す適切な場所にキーを追加するように ssh-copy-id に明示的に要求する方法はありますか?
root@client# ssh-copy-id root@server
Password: ********
Now try logging into the machine, with "ssh 'root@server'", and check in:
.ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.
root@client#
ありがとう!