ssh -v -i /Users/XXXXXXXX/Desktop/Mash/id_rsa sftp@XXX.XX.XXX>XXX
で接続しようとしましたが、できませんでした。
CENTOS 7です
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to XXX.XX.XXX [XXX.xx.XXX.XXX] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: key_load_public: No such file or directory
debug1: identity file /Users/XXXXXXXX/Desktop/Mash/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/XXXXXXXXX/Desktop/Mash/id_rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.9
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1
debug1: match: OpenSSH_6.6.1 pat OpenSSH_6.6.1* compat 0x04000000
debug1: Authenticating to XXX.XX.XXX.XXX:22 as 'sftp'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client chacha20-poly1305@openssh.com <implicit> none
debug1: kex: client->server chacha20-poly1305@openssh.com <implicit> none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:YeklAEjYmSzd7GxHCfuSMGKnevRYwJ6HpzI7U5TTLWQ
debug1: Host 'XXX.XX.XXX.XXX' is known and matches the ECDSA host key.
debug1: Found key in /var/root/.ssh/known_hosts:1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/XXXXXXXX/Desktop/Mash/id_rsa
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
また、サーバで公開鍵を作成し、authorized_keysには書き込んでいます。
以上 ヨロしくお願いします。