Ubuntu 16.04(公開鍵)で権限が拒否されました。

Ubuntu 16.04(公開鍵)で権限が拒否されました。
$ ssh mykey.pem [email protected] -v
OpenSSH_7.3p1, OpenSSL 1.0.2j  26 Sep 2016
debug1: Reading configuration data /c/Users/works/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to 10.128.2.7 [10.128.2.7] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/works/Documents/interface setup/ifx_key.pem type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/works/Documents/interface setup/ifx_key.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.3
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8 pat OpenSSH_6.6.1* compat 0x04000000
debug1: Authenticating to 10.128.2.7:22 as 'ubuntu'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: [email protected]
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:R+d2ELtCJyoeyHMfivCsGKk98GOIfxxsTEPAFmKkSOI
debug1: Host '10.128.2.7' is known and matches the ECDSA host key.
debug1: Found key in /c/Users/works/.ssh/known_hosts:1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /c/Users/works/Documents/interface setup/ifx_key.pem
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
Permission denied (publickey).

昨日まではこのパソコンにSSHで接続できませんでした。ログインする方法はありますか?

ベストアンサー1

.ssh/authorized_keysサーバーで参照された秘密鍵がある場合にのみ可能です。ファイルを削除しましたか、内容を変更しましたか?

この情報を削除してディスクへの物理アクセスが失われると、サーバーに再度ログインできなくなります。

これはデフォルトのSSHセキュリティです。に記載されている適切なキーがないと.ssh/authorized_keysアクセスできません。これにより、他の人があなたのサーバーに簡単にアクセスできなくなります。

おすすめ記事