Autenticação de chave pública do CentOS VPS, Permissão negada (publickey, gssapi-keyex, gssapi-with-mic)

0

Olá, estou usando cmder (Console Emulator) no windows para conectar ao meu VPS

Eu quero fazer login no ssh usando uma autenticação de chave pública.

No meu computador local, gerou um par de chaves pública e privada no meu diretório pessoal na pasta .ssh, como na imagem abaixo:

EugerouumpardechavespúblicaeprivadanomeuVPSnapasta/root/.ssh,comomostrado.

Eucopieiachavepúblicadomeucomputadorlocalparaasauthorized_keysnoVPS,conformemostradoabaixo:

Quando tento entrar no ssh, recebo o seguinte erro:

ssh -v [email protected] -p 2222
OpenSSH_7.3p1, OpenSSL 1.0.2j  26 Sep 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to XX.XX.XXX.XX [XX.XX.XXX.XX] port 2222.
debug1: Connection established.
debug1: identity file /c/Users/Ouss/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/Ouss/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/Ouss/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/Ouss/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/Ouss/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/Ouss/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/Ouss/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/Ouss/.ssh/id_ed25519-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_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH_5* compat 0x0c000000
debug1: Authenticating to XX.XX.XXX.XX:2222 as 'myuser'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: diffie-hellman-group-exchange-sha256
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: [email protected] compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: [email protected] compression: none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(2048<3072<8192) sent
debug1: got SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: got SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: ssh-rsa SHA256:R0Wzw4nu+ko/G13Og1JgIViSkSAGk/Wzg9y2eRSsgU0
debug1: Host '[XX.XX.XXX.XX]:2222' is known and matches the RSA host key.
debug1: Found key in /c/Users/Ouss/.ssh/known_hosts:1
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_ACCEPT received


debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /c/Users/Ouss/.ssh/id_rsa
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug1: Trying private key: /c/Users/Ouss/.ssh/id_dsa
debug1: Trying private key: /c/Users/Ouss/.ssh/id_ecdsa
debug1: Trying private key: /c/Users/Ouss/.ssh/id_ed25519
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

Aqui está o meu ssh_config:

# Authentication:

#LoginGraceTime 2m
PermitRootLogin no
StrictModes yes
MaxAuthTries 3
#MaxSessions 10

RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile      ssh/authorized_keys
#AuthorizedKeysCommand none
#AuthorizedKeysCommandRunAs nobody

Você pode me ajudar com isso, por favor?

    
por user754144 24.07.2017 / 10:46

0 respostas