ssh reset conexão

Olá espero posa ter uma resposta para meu problema.
Eu estou tentando fazer uma conexão mediante ssh porem não posso.

ssh afo@192.168.138.24
Connection reset by 192.168.138.246 port 22

[alfredo2@localhost ~]$ ssh -v afo@192.168.138.246
OpenSSH_8.1p1, OpenSSL 1.1.1d FIPS 10 Sep 2019
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf
debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
debug1: configuration requests final Match pass
debug1: re-parsing configuration
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf
debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
debug1: Connecting to 192.168.138.246 [192.168.138.246] port 22.
debug1: Connection established.
debug1: identity file /home/alfredo2/.ssh/id_rsa type -1
debug1: identity file /home/alfredo2/.ssh/id_rsa-cert type -1
debug1: identity file /home/alfredo2/.ssh/id_dsa type -1
debug1: identity file /home/alfredo2/.ssh/id_dsa-cert type -1
debug1: identity file /home/alfredo2/.ssh/id_ecdsa type -1
debug1: identity file /home/alfredo2/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/alfredo2/.ssh/id_ed25519 type -1
debug1: identity file /home/alfredo2/.ssh/id_ed25519-cert type -1
debug1: identity file /home/alfredo2/.ssh/id_xmss type -1
debug1: identity file /home/alfredo2/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.2
debug1: match: OpenSSH_6.2 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.138.246:22 as 'afo'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: ecdh-sha2-nistp256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: aes256-gcm@openssh.com MAC: compression: none
debug1: kex: client->server cipher: aes256-gcm@openssh.com MAC: compression: none
debug1: kex: ecdh-sha2-nistp256 need=32 dh_need=32
debug1: kex: ecdh-sha2-nistp256 need=32 dh_need=32
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
Connection reset by 192.168.138.246 port 22

o que posso fazer ?? obrigado

Comentários

  • leandroramos
    editado fevereiro 2020

    Digite seu comentário> @nemo82 disse:

    Olá espero posa ter uma resposta para meu problema.
    Eu estou tentando fazer uma conexão mediante ssh porem não posso.

    ssh afo@192.168.138.24
    Connection reset by 192.168.138.246 port 22

    [alfredo2@localhost ~]$ ssh -v afo@192.168.138.246
    OpenSSH_8.1p1, OpenSSL 1.1.1d FIPS 10 Sep 2019
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf
    debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
    debug1: configuration requests final Match pass
    debug1: re-parsing configuration
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf
    debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
    debug1: Connecting to 192.168.138.246 [192.168.138.246] port 22.
    debug1: Connection established.
    debug1: identity file /home/alfredo2/.ssh/id_rsa type -1
    debug1: identity file /home/alfredo2/.ssh/id_rsa-cert type -1
    debug1: identity file /home/alfredo2/.ssh/id_dsa type -1
    debug1: identity file /home/alfredo2/.ssh/id_dsa-cert type -1
    debug1: identity file /home/alfredo2/.ssh/id_ecdsa type -1
    debug1: identity file /home/alfredo2/.ssh/id_ecdsa-cert type -1
    debug1: identity file /home/alfredo2/.ssh/id_ed25519 type -1
    debug1: identity file /home/alfredo2/.ssh/id_ed25519-cert type -1
    debug1: identity file /home/alfredo2/.ssh/id_xmss type -1
    debug1: identity file /home/alfredo2/.ssh/id_xmss-cert type -1
    debug1: Local version string SSH-2.0-OpenSSH_8.1
    debug1: Remote protocol version 2.0, remote software version OpenSSH_6.2
    debug1: match: OpenSSH_6.2 pat OpenSSH* compat 0x04000000
    debug1: Authenticating to 192.168.138.246:22 as 'afo'
    debug1: SSH2_MSG_KEXINIT sent
    debug1: SSH2_MSG_KEXINIT received
    debug1: kex: algorithm: ecdh-sha2-nistp256
    debug1: kex: host key algorithm: ecdsa-sha2-nistp256
    debug1: kex: server->client cipher: aes256-gcm@openssh.com MAC: compression: none
    debug1: kex: client->server cipher: aes256-gcm@openssh.com MAC: compression: none
    debug1: kex: ecdh-sha2-nistp256 need=32 dh_need=32
    debug1: kex: ecdh-sha2-nistp256 need=32 dh_need=32
    debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
    Connection reset by 192.168.138.246 port 22

    o que posso fazer ?? obrigado

    Você pode mostrar as permissões da sua pasta /etc/ssh com o comando ls -la /etc/ssh ?
    Ah, seria bom ver, também, as permissões da pasta ~/.ssh com ls -la ~/.ssh

  • estou com o mesmo problema... no caso eu trabalho com diversos servidores em cloud e ao tertar acessar ..

    exemplo:

    ssh -i ~/.ssh/some_key user@example.com
    Received disconnect from xx.xxxx.xx..xx port 22:2: Too many authentication failures
    Disconnected from xx.xxx.xxx.x port 22

    aí quando rodo um:

    eval "$(ssh-agent -s)"
    Agent pid 13350

    o comando SSH entra de boa

  • Digite seu comentário> @mesaque disse:

    estou com o mesmo problema... no caso eu trabalho com diversos servidores em cloud e ao tertar acessar ..

    exemplo:

    ssh -i ~/.ssh/some_key user@example.com
    Received disconnect from xx.xxxx.xx..xx port 22:2: Too many authentication failures
    Disconnected from xx.xxx.xxx.x port 22

    aí quando rodo um:

    eval "$(ssh-agent -s)"
    Agent pid 13350

    o comando SSH entra de boa

    Obrigado :)

  • Digite seu comentário> @nemo82 disse:

    Olá espero posa ter uma resposta para meu problema.
    Eu estou tentando fazer uma conexão mediante ssh porem não posso.

    ssh afo@192.168.138.24
    Connection reset by 192.168.138.246 port 22

    [alfredo2@localhost ~]$ ssh -v afo@192.168.138.246
    OpenSSH_8.1p1, OpenSSL 1.1.1d FIPS 10 Sep 2019
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf
    debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
    debug1: configuration requests final Match pass
    debug1: re-parsing configuration
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf
    debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
    debug1: Connecting to 192.168.138.246 [192.168.138.246] port 22.
    debug1: Connection established.
    debug1: identity file /home/alfredo2/.ssh/id_rsa type -1
    debug1: identity file /home/alfredo2/.ssh/id_rsa-cert type -1
    debug1: identity file /home/alfredo2/.ssh/id_dsa type -1
    debug1: identity file /home/alfredo2/.ssh/id_dsa-cert type -1
    debug1: identity file /home/alfredo2/.ssh/id_ecdsa type -1
    debug1: identity file /home/alfredo2/.ssh/id_ecdsa-cert type -1
    debug1: identity file /home/alfredo2/.ssh/id_ed25519 type -1
    debug1: identity file /home/alfredo2/.ssh/id_ed25519-cert type -1
    debug1: identity file /home/alfredo2/.ssh/id_xmss type -1
    debug1: identity file /home/alfredo2/.ssh/id_xmss-cert type -1
    debug1: Local version string SSH-2.0-OpenSSH_8.1
    debug1: Remote protocol version 2.0, remote software version OpenSSH_6.2
    debug1: match: OpenSSH_6.2 pat OpenSSH* compat 0x04000000
    debug1: Authenticating to 192.168.138.246:22 as 'afo'
    debug1: SSH2_MSG_KEXINIT sent
    debug1: SSH2_MSG_KEXINIT received
    debug1: kex: algorithm: ecdh-sha2-nistp256
    debug1: kex: host key algorithm: ecdsa-sha2-nistp256
    debug1: kex: server->client cipher: aes256-gcm@openssh.com MAC: compression: none
    debug1: kex: client->server cipher: aes256-gcm@openssh.com MAC: compression: none
    debug1: kex: ecdh-sha2-nistp256 need=32 dh_need=32
    debug1: kex: ecdh-sha2-nistp256 need=32 dh_need=32
    debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
    Connection reset by 192.168.138.246 port 22

    o que posso fazer ?? obrigado

    Oi. Você ainda está tentando resolver o problema?

  • Boa @leandroramos a todos, obrigado pelas respostas e desculpem meu atraso na resposta. Leandroramos eu coloquei os comandos que vc me escreveu:

    [afo@localhost ~]$ ls -la /etc/ssh
    total 596
    drwxr-xr-x. 3 root root 4096 fev 17 15:17 .
    drwxr-xr-x. 165 root root 12288 fev 22 17:07 ..
    -rw-r--r--. 1 root root 577388 out 9 10:00 moduli
    -rw-r--r--. 1 root root 1716 out 9 10:00 ssh_config
    drwxr-xr-x. 2 root root 4096 out 9 10:00 ssh_config.d
    -rw-------. 1 root root 4440 out 9 10:00 sshd_config

    [afo@localhost ~]$ ls -la ~/.ssh
    total 12
    drwx------. 2 afo afo 4096 nov 25 18:57 .
    drwx------. 40 afo afo 4096 fev 23 15:24 ..
    -rw-r--r--. 1 afo afo 2337 nov 25 19:15 known_hosts

  • Digite seu comentário> @leandroramos disse:

    Digite seu comentário> @nemo82 disse:

    Olá espero posa ter uma resposta para meu problema.
    Eu estou tentando fazer uma conexão mediante ssh porem não posso.

    ssh afo@192.168.138.24
    Connection reset by 192.168.138.246 port 22

    [alfredo2@localhost ~]$ ssh -v afo@192.168.138.246
    OpenSSH_8.1p1, OpenSSL 1.1.1d FIPS 10 Sep 2019
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf
    debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
    debug1: configuration requests final Match pass
    debug1: re-parsing configuration
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf
    debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
    debug1: Connecting to 192.168.138.246 [192.168.138.246] port 22.
    debug1: Connection established.
    debug1: identity file /home/alfredo2/.ssh/id_rsa type -1
    debug1: identity file /home/alfredo2/.ssh/id_rsa-cert type -1
    debug1: identity file /home/alfredo2/.ssh/id_dsa type -1
    debug1: identity file /home/alfredo2/.ssh/id_dsa-cert type -1
    debug1: identity file /home/alfredo2/.ssh/id_ecdsa type -1
    debug1: identity file /home/alfredo2/.ssh/id_ecdsa-cert type -1
    debug1: identity file /home/alfredo2/.ssh/id_ed25519 type -1
    debug1: identity file /home/alfredo2/.ssh/id_ed25519-cert type -1
    debug1: identity file /home/alfredo2/.ssh/id_xmss type -1
    debug1: identity file /home/alfredo2/.ssh/id_xmss-cert type -1
    debug1: Local version string SSH-2.0-OpenSSH_8.1
    debug1: Remote protocol version 2.0, remote software version OpenSSH_6.2
    debug1: match: OpenSSH_6.2 pat OpenSSH* compat 0x04000000
    debug1: Authenticating to 192.168.138.246:22 as 'afo'
    debug1: SSH2_MSG_KEXINIT sent
    debug1: SSH2_MSG_KEXINIT received
    debug1: kex: algorithm: ecdh-sha2-nistp256
    debug1: kex: host key algorithm: ecdsa-sha2-nistp256
    debug1: kex: server->client cipher: aes256-gcm@openssh.com MAC: compression: none
    debug1: kex: client->server cipher: aes256-gcm@openssh.com MAC: compression: none
    debug1: kex: ecdh-sha2-nistp256 need=32 dh_need=32
    debug1: kex: ecdh-sha2-nistp256 need=32 dh_need=32
    debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
    Connection reset by 192.168.138.246 port 22

    o que posso fazer ?? obrigado

    Oi. Você ainda está tentando resolver o problema?

    estou sim!!