Autor Tópico: Conexão fechada pela outra ponta (SSH)?  (Lida 15321 vezes)

Offline Joule

  • Usuário Ubuntu
  • *
  • Mensagens: 89
    • Ver perfil
Re: Conexão fechada pela outra ponta (SSH)?
« Resposta #15 Online: 05 de MAR?O de 2012, 09:50 »
Olá, depois de varias tentativas de conecta através do putty deu essa mensagem agora:

debug1: Server will not fork when running in debugging mode.
debug1: rexec start in 5 ou 5 newsock 5 pipe -1 sock 8
debug1: sshd version OpenSSH_5.8p1 Debian-1ubuntu3
debug1: read PEM private key done: type RSA
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: private host key: #0 type 1 RSA
debug1: read PEM private key done: type ECDSA
debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-1024
debug1: Checking blacklist file /etc/ssh/blacklist.DSA-1024
debug1: private host key: #1 type 2 DSA
debug1: read PEM private key done: type ECDSA
debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-256
debug1: Checking blacklist file /etc/ssh/blacklist.DSA-256
debug1: private host key: #2 type 3 ECDSA
debug1: inetd sockets after dupping: 3,3
Conection from 192.168.0.213 port 38575
debug1: Client protocol version 2.0; client software version PuTTY_Release_0.61
debug1: no match: PuTTY_Release_0.61
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.8p1 Debian-1ubuntu3
debug1: permanyntly_set_uid: 102/65534
debug1: list_hostkey_types: ssh-rsa, ssh-dss, ecdsa-sha2-nistp256
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: client -> server aes256-ctr hmac-sha1 none
debug1: kex: server -> client aes256-ctr hmac-sha1 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST_OLD received
debug1: SSH2_MSG_KEX_DH_GEX_GROUP sent
debug1: expecting SSHE_MSG_KEX_DH_GEX_INIT
debug1: SSH2_MSG_KEX_DH_GEX_REPLY sent
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: KEX done


o curso continua piscando ao final e quando coloquei o usuário no cliente para e dei enter para poder informar a senha já deu uma mensagem "conexão fechada pela outra ponta"!

Offline zekkerj

  • Usuário Ubuntu
  • *
  • Mensagens: 19.736
  • Gratidão gera gratidão, lamúria atrai lamúria...
    • Ver perfil
    • Blog do Zekke
Re: Conexão fechada pela outra ponta (SSH)?
« Resposta #16 Online: 05 de MAR?O de 2012, 10:10 »
No momento em que vc faz a conexão, vai aparecer mais informação no servidor. É dessa informação no servidor que a gente precisa.
Pesquise antes de perguntar, sua dúvida pode já ter sido respondida.
Não respondo dúvidas por MP, coloque sua dúvida no fórum onde ela pode ser pesquisada pelos seus colegas!
Não venha ao fórum apenas para perguntar. Se você sabe a resposta de um problema, porque não ajudar seu colega? ;D

Offline Joule

  • Usuário Ubuntu
  • *
  • Mensagens: 89
    • Ver perfil
Re: Conexão fechada pela outra ponta (SSH)?
« Resposta #17 Online: 05 de MAR?O de 2012, 10:21 »
Ola zekkerj, eu useio o comando que você mandou no servidor sshd -D -d -e  e apareceu a seguinte mensagem:

debug1: sshd version OpenSSH_5.8p1 Debian-1ubuntu3
debug1: read PEM private key done: type RSA
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checing blacklist file /etc/ssh/blaclist.TDA-2048
debug1: private host key: #0 type 1 RSA
debug1: read PEM private key done: type DSA
debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-1024
debug1: Checking blacklist file /etc/ssh/blacklist.DSA-1024
debug1: private host key; #1 type 2 DSA
debug1: read PEM private key done: type ECDSA
debug1: Checking blacklist file /usr/shared/ssh/blacklist.ECDSA-256
debug1: Checking blacklist file /etc/ssh/blacklist.ECDSA-256
debug1: private host key: #2 type 3 ECDSA
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-D'
debug1: rexec_argv[1]='-d'
debug1: rexec_argv[1]='-e'
Set /proc/self/oom_score_adj from 0 to -1000
debug1: Bind to port 22 on 0.0.0.0
Server listening on 0.0.0.0 port 22
debug1: Bind to port 22 in ::.
Server listening on :: port 22

fui na maquina cliente e tentei me conectar pelo putty e apareceu essa mensagem:

debug1: Server will not fork when running in debugging mode.
debug1: rexec start in 5 ou 5 newsock 5 pipe -1 sock 8
debug1: sshd version OpenSSH_5.8p1 Debian-1ubuntu3
debug1: read PEM private key done: type RSA
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: private host key: #0 type 1 RSA
debug1: read PEM private key done: type ECDSA
debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-1024
debug1: Checking blacklist file /etc/ssh/blacklist.DSA-1024
debug1: private host key: #1 type 2 DSA
debug1: read PEM private key done: type ECDSA
debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-256
debug1: Checking blacklist file /etc/ssh/blacklist.DSA-256
debug1: private host key: #2 type 3 ECDSA
debug1: inetd sockets after dupping: 3,3
Conection from 192.168.0.213 port 38575
debug1: Client protocol version 2.0; client software version PuTTY_Release_0.61
debug1: no match: PuTTY_Release_0.61
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.8p1 Debian-1ubuntu3
debug1: permanyntly_set_uid: 102/65534
debug1: list_hostkey_types: ssh-rsa, ssh-dss, ecdsa-sha2-nistp256
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: client -> server aes256-ctr hmac-sha1 none
debug1: kex: server -> client aes256-ctr hmac-sha1 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST_OLD received
debug1: SSH2_MSG_KEX_DH_GEX_GROUP sent
debug1: expecting SSHE_MSG_KEX_DH_GEX_INIT
debug1: SSH2_MSG_KEX_DH_GEX_REPLY sent
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: KEX done


ai coloquei o usuário usuario e senha e já deu acesso negado!

Acabei de fazer outro teste e no cliente deu a mensagem "porta fechada pela outra ponta"  e no servidor esta:

debug1: Server will not fork when running in debugging mode.

   debug1: rexec start in 5 ou 5 newsock 5 pipe -1 sock 8
   debug1: sshd version OpenSSH_5.8p1 Debian-1ubuntu3
   debug1: read PEM private key done: type RSA
   debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
   debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
   debug1: private host key: #0 type 1 RSA
   debug1: read PEM private key done: type ECDSA
   debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-1024
   debug1: Checking blacklist file /etc/ssh/blacklist.DSA-1024
   debug1: private host key: #1 type 2 DSA
   debug1: read PEM private key done: type ECDSA
   debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-256
   debug1: Checking blacklist file /etc/ssh/blacklist.DSA-256
   debug1: private host key: #2 type 3 ECDSA
   debug1: inetd sockets after dupping: 3,3
   Conection from 192.168.0.213 port 53455

O que eu observei que mudou foi só a porta agora.. e o curso continua piscando ao final dessa linha!.... o que devo fazer? insisti nesse mesmo comando sshd -D -d -e?

 

Offline zekkerj

  • Usuário Ubuntu
  • *
  • Mensagens: 19.736
  • Gratidão gera gratidão, lamúria atrai lamúria...
    • Ver perfil
    • Blog do Zekke
Re: Conexão fechada pela outra ponta (SSH)?
« Resposta #18 Online: 05 de MAR?O de 2012, 10:25 »
Não, a informação não ajudou. Vamos tentar outra fonte de informação.

Mostre as 20 últimas linhas do arquivo "/var/log/auth.log".
Pesquise antes de perguntar, sua dúvida pode já ter sido respondida.
Não respondo dúvidas por MP, coloque sua dúvida no fórum onde ela pode ser pesquisada pelos seus colegas!
Não venha ao fórum apenas para perguntar. Se você sabe a resposta de um problema, porque não ajudar seu colega? ;D

Offline Joule

  • Usuário Ubuntu
  • *
  • Mensagens: 89
    • Ver perfil
Re: Conexão fechada pela outra ponta (SSH)?
« Resposta #19 Online: 05 de MAR?O de 2012, 11:35 »
sshd[772]: Server listening on 0.0.0.0 port 22.
sshd[772]: Server listening on :: port 22.
login[920]: pam_unix(login:session): session opened for user root by LOGIN(uid=0)
login[970]: ROOT LOGIN on '/dev/tty1'
CRON[1026]: pam_unix(cron:session): session opened for user root by (uid=0)
CRON[1026]: pam_unix(cron:session): session closed for user root
sshd[772]: Received signal 15; terminating.
login[920]: pam_uni(login:session): session closed for user root
login[1059]: pam_unix(login:auth): check pass: user unknown
login[1059]: pam_unix(login:auth): authentication failure; logname=LOGIN uid=0 tty=/dev/tty1 ruser= rhost=
login[1059]: FAILEDLOGIN (1) on '/dev/tty1' FOR 'UNKNOWN', Authentication failure
login[1059]: pam_unix(login:session): session opened for user master by LOGIN(UID=0)
sudo: master : TTY=tty1 ; PWD=/home/master ; USER=root / COMMAND=/usr/sbin/sshd -D -d -e







Offline Joule

  • Usuário Ubuntu
  • *
  • Mensagens: 89
    • Ver perfil
Re: Conexão fechada pela outra ponta (SSH)?
« Resposta #20 Online: 07 de MAR?O de 2012, 14:30 »
Olá pessoa, resolvi formatar e começar uma instalação limpar e com mais calma e após varias tentativas fiquei preso ao mesmo problema que postei aqui, no meu arquivo /var/log/auth.log tem as seguintes linhas:

login[1097]: pam_unix(login:auth): authentication failure; logname=LOGIN uid=0 euid=0 tty=/dev/tty1 ruser= rhost= user=master
login[1097]: FAILED LOGIN (2) ON '/dev/tty1' FOR 'UNKNOW', Authentication failure
login[1097]: pam_unix(login:auth): check pass; user unknown
login[1097]: pam_unix(login:auth): authentication failure; logname=LOGIN uid=0 euid=0 tty=/dev/tty1 ruser= rhost= user=
login[1097]: FAILED LOGIN (2) ON '/dev/tty1' FOR 'UNKNOW', Authentication failure
login[1097]: pam_unix(login:auth): session opened for user master by LOGIN(uid=0)
CRON[1232]: pam_unix(cron:session): session opened for user root by (uid=0)
CRON[1232]: pam_unix(cron:session): session closed for user root
sshd[1235]: Accepted password for master from 192.168.0.213 port 53283 ssh2
sshd[1235]: pam_unix(sshd:session): session opened for user master by (uid=0)
sudo: master : TTY=pts/0 ; PWD=/home/master ; USER=root ; COMMAND=/sbin/reboot
sshd[945]: Server listening on 0.0.0.0 port 22.
sshd[945]: Server listening on :: port 22.
login[1117]: pam_unix(login:session): sesion opened for user master by LOGIN(uid=0)
login[1117]: pam_unix(login:session): sesion closed for user master
login[1242]: pam_unix(login:session): sesion opened for user master by LOGIN(uid=0)
sudo: master : TTY=pts/0 ; PWD=/home/master ; USER=root ; COMMAND=/bin/su
su[1365]: Successful su for root by root
su[1365]: + /dev/tty1 root:root
su[1365]: pam_unix(su:session): sesion opened for user root by master(uid=0)
passwd[1379]: pam_unix(passwd:chauthtok): password changed for root
su[1365]: pam_unix(su:session): session closed for user root
login[1242]: pam_unix(login:session): sesion closed for user master
login[1384]: pam_unix(login:session): sesion opened for user root by LOGIN(uid=0)
login[1410]: ROOT LOGIN on '/dev/tty1'
CRON[1486]: pam_unix(cron:session): sesion opened for user root by (uid=0)
CRON[1486]: pam_unix(login:session): sesion closed for user root
CRON[1490]: pam_unix(cron:session): sesion opened for user root by (uid=0)
CRON[1490]: pam_unix(login:session): sesion closed for user root
sshd[945]: Received signal 15; terminating.
« Última modificação: 07 de MAR?O de 2012, 14:56 por Joule »

Offline Joule

  • Usuário Ubuntu
  • *
  • Mensagens: 89
    • Ver perfil
Re: Conexão fechada pela outra ponta (SSH)?
« Resposta #21 Online: 07 de MAR?O de 2012, 23:46 »
Pessoal eu fiz o teste no servidor usando o comando ssh -v root@192.168.0.7 e o mesmo me pedi usuário e senha e passar normalmente,  também fiz outro teste e observei que quando eu fico em média 30 min sem tentar fazer login do cliente para o servidor via ssh, ele funciona, agora por pouco tempo e a mensagem de "conexão fechada pela outra ponta" volta a aparecer e fecha a janela. Percebi com os teste que deve ser um serviço oscilano!

Abaixo o teste que fiz na maquina cliente para o servidor!

iran@Development:~$ ssh -v root@192.168.0.7
OpenSSH_5.8p1 Debian-7ubuntu1, OpenSSL 1.0.0e 6 Sep 2011
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 192.168.0.7 [192.168.0.7] port 22.
debug1: Connection established.
debug1: identity file /home/iran/.ssh/id_rsa type -1
debug1: identity file /home/iran/.ssh/id_rsa-cert type -1
debug1: identity file /home/iran/.ssh/id_dsa type -1
debug1: identity file /home/iran/.ssh/id_dsa-cert type -1
debug1: identity file /home/iran/.ssh/id_ecdsa type -1
debug1: identity file /home/iran/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.2
debug1: match: OpenSSH_5.2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.8p1 Debian-7ubuntu1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA 2d:41:04:c2:06:17:db:dd:55:72:56:e0:97:22:be:81
debug1: Host '192.168.0.7' is known and matches the RSA host key.
debug1: Found key in /home/iran/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: password
debug1: Next authentication method: password
root@192.168.0.7's password:
debug1: Authentications that can continue: password
Permission denied, please try again.
root@192.168.0.7's password: