
id_rsa.pub
ローカル~/.ssh
ディレクトリに存在する場合、コマンドを使用してリモート サーバーに接続できないことに気付きましたssh
。
しかし、なぜそうなるのかは分かりません。公開鍵が秘密鍵と同じ場所に存在すると、セキュリティ上危険なのでしょうか?
ssh
また、オプション付きでコマンドを実行しても、公開鍵をそこに配置すべきではないことを示すエラーは表示されません-v
。
なぜ公開鍵を入れてはいけないのですか~/.ssh/
?
ssh
これはオプション付きのログの一部です。cygwin環境で-v
使用しています。ssh
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/ironsand/.ssh/id_rsa
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug1: Trying private key: /home/ironsand/.ssh/id_dsa
debug1: Trying private key: /home/ironsand/.ssh/id_ecdsa
debug1: Trying private key: /home/ironsand/.ssh/id_ed25519
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).