Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 26/08/2019, à 10:54

Zafl

Probleme de connection ssh "Connection reset by peer"

Salut !
Je viens à vous car je suis au bout de ma vie avec ce problème !
Quand je tente de me co en ssh à un de mes serveurs (n'importe lequel) de façon aléatoire je vais avoir l'erreur Connection reset by peer, si je tente une 2eme connexion, je peux me connecter !

ssh martial@192.168.xxx.xxx -vvvv
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for 
debug2: resolving "192.168.xxx.xxx" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 192.168.xxx.xxx [192.168.xx.xxx] port 22.
debug1: Connection established.
debug1: identity file /home/adminmartial/.ssh/id_rsa type 0
debug1: key_load_public: No such file or directory
debug1: identity file /home/adminmartial/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/adminmartial/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/adminmartial/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/adminmartial/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/adminmartial/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/adminmartial/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/adminmartial/.ssh/id_ed25519-cert type -1
write: Connection reset by peer

je précise que pour le moment je n'ai aucune règle iptables d'active donc pas de firewall.
j'ai essayé quelques solutions proposées sur les forums mais sans succès :
  - Réinstallation de openssh: remove/purge/install
  - J'ai édité / etc / ssh / sshd_config recherché la ligne indiquant ClientAliveInterval et augmenté de 600. Sur le client j'ai modifié / etc / ssh / sshd_config recherché cette fois-ci la ligne ServerAliveInterval et augmenté à 600.
Bref, toute aide est bienvenue smile

Hors ligne

#2 Le 26/08/2019, à 14:28

bruno

Re : Probleme de connection ssh "Connection reset by peer"

Bonjour,

Si cela se produit de la me façon avec différents serveurs, c'est que le problème se situe au niveau du client et non du serveur.
Il faut commencer par regarder le contenu du fichier /etc/ssh/ssh_config sur le client.

En ligne

#3 Le 26/08/2019, à 16:34

Zafl

Re : Probleme de connection ssh "Connection reset by peer"

Salut bruno !
Oui cela se produit de la même façon avec tout mes serveurs, mais ils sont tous identiques en tout points (same install and config).
Pour ce qui est de mon fichier /etc/ssh/ssh_config sur le client

cat /etc/ssh/ssh_config 

# This is the ssh client system-wide configuration file.  See
# ssh_config(5) for more information.  This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.

# Configuration data is parsed as follows:
#  1. command line options
#  2. user-specific file
#  3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.

# Site-wide defaults for some commonly used options.  For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.

Host *
#   ForwardAgent no
#   ForwardX11 no
#   ForwardX11Trusted yes
#   PasswordAuthentication yes
#   HostbasedAuthentication no
#   GSSAPIAuthentication no
#   GSSAPIDelegateCredentials no
#   GSSAPIKeyExchange no
#   GSSAPITrustDNS no
#   BatchMode no
#   CheckHostIP yes
#   AddressFamily any
#   ConnectTimeout 0
#   StrictHostKeyChecking ask
#   IdentityFile ~/.ssh/id_rsa
#   IdentityFile ~/.ssh/id_dsa
#   IdentityFile ~/.ssh/id_ecdsa
#   IdentityFile ~/.ssh/id_ed25519
#   Port 22
#   Protocol 2
#   Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc
#   MACs hmac-md5,hmac-sha1,umac-64@openssh.com
#   EscapeChar ~
#   Tunnel no
#   TunnelDevice any:any
#   PermitLocalCommand no
#   VisualHostKey no
#   ProxyCommand ssh -q -W %h:%p gateway.example.com
#   RekeyLimit 1G 1h
    SendEnv LANG LC_*
    HashKnownHosts yes
    GSSAPIAuthentication yes

Hors ligne

#4 Le 26/08/2019, à 16:42

bruno

Re : Probleme de connection ssh "Connection reset by peer"

Bon, c'est la configuration par défaut, donc le problème ne vient probablement pas de là.

Il va falloir regarder côté serveur le sshd_config. Est-ce que tu utilises l'authentification par clé ? Si oui, avec quel type de clé ? D'après le retour du #1 aucune clé n'est trouvée dans /home/adminmartial/.ssh/

En ligne

#5 Le 27/08/2019, à 09:37

Zafl

Re : Probleme de connection ssh "Connection reset by peer"

Yop, du coup pour le sshd_config sur l'un des serveurs

cat /etc/ssh/sshd_config 
#	$OpenBSD: sshd_config,v 1.101 2017/03/14 07:19:07 djm Exp $

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options override the
# default value.

#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key

# Ciphers and keying
#RekeyLimit default none

# Logging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
#PermitRootLogin prohibit-password
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

#PubkeyAuthentication yes

# Expect .ssh/authorized_keys2 to be disregarded by default in future.
#AuthorizedKeysFile	.ssh/authorized_keys .ssh/authorized_keys2

#AuthorizedPrincipalsFile none

#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no

# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes

#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
PrintMotd no
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none

# no default banner path
#Banner none

# Allow client to pass locale environment variables
AcceptEnv LANG LC_*

# override default of no subsystems
Subsystem sftp	/usr/lib/openssh/sftp-server

# Example of overriding settings on a per-user basis
#Match User anoncvs
#	X11Forwarding no
#	AllowTcpForwarding no
#	PermitTTY no
#	ForceCommand cvs server
PasswordAuthentication yes

Oui j'utilise bien une authentification par clef RSA j'ai utilisé les commandes suivante :
  - ssh-keygen -t rsa
  - ssh-copy-id -i ma_clé.pub mon_login@mon_serveur

Justement je trouve le retour du #1 plutôt bizarre car elles sont bien la  :

adminmartial@gwcmartial:~$ ls /home/adminmartial/.ssh/
id_rsa  id_rsa.pub  known_hosts  known_hosts.old

Hors ligne

#6 Le 27/08/2019, à 10:13

Nasman

Re : Probleme de connection ssh "Connection reset by peer"

Dans mon fichier /etc/ssh/sshd_config j'ai une ligne (à la fin)

AllowUsers mon_login

et j'ai ce réglage

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication no
PermitEmptyPasswords no

PC fixe sous Bionic 64 bits et portable avec Focal 64 bits

Hors ligne

#7 Le 27/08/2019, à 10:50

bruno

Re : Probleme de connection ssh "Connection reset by peer"

C'est également la configuration par défaut pour le sshd-config. Donc cela devrait fonctionner.
Contrairement à ce que j'ai dit précédemment ta clé RSA est bien trouvée dans le retour du #1 (j'avais lu un peu vite) mais on ne voit pas pourquoi la connexion échoue si ce n'est le « Reset by peer ».
Cela fait plus penser à un problème de connectivité : configuration réseau exotique sur le client, pare-feu sur le client, pilote de carte réseau foireux sur le client, etc. que de configuration SSH. S'il y avait un problème de coupure de connexion dû à des valeurs ClientAliveInterval/ServerAliveInterval trop faibles, tu aurais des erreurs du type « broken pipe», de toute façon c'est désactivé par défaut (valeurs à zéro).

Peut-être que les logs du serveur donnent plus d'informations.

En ligne

#8 Le 27/08/2019, à 15:05

Zafl

Re : Probleme de connection ssh "Connection reset by peer"

@nasman j'ai essayé mais ça ne résout pas mon problème hmm
@bruno je suis parti voir dans /var/log/auth.log je te laisse l'intégralité du fichier car je ne comprends pas grand chose hmm

cat /var/log/auth.log
Aug 26 06:25:02 martial_16 CRON[6716]: pam_unix(cron:session): session closed for user root
Aug 26 07:17:01 martial_16 CRON[6931]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 26 07:17:01 martial_16 CRON[6931]: pam_unix(cron:session): session closed for user root
Aug 26 08:17:01 martial_16 CRON[6935]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 26 08:17:01 martial_16 CRON[6935]: pam_unix(cron:session): session closed for user root
Aug 26 08:39:01 martial_16 systemd-logind[1307]: Watching system buttons on /dev/input/event1 (iLO Virtual Keyboard)
Aug 26 08:39:14 martial_16 sudo: martial : TTY=tty1 ; PWD=/home/martial ; USER=root ; COMMAND=/usr/bin/vi /etc/ssh/sshd_config
Aug 26 08:39:14 martial_16 sudo: pam_unix(sudo:session): session opened for user root by martial(uid=0)
Aug 26 08:39:27 martial_16 sudo: pam_unix(sudo:session): session closed for user root
Aug 26 08:39:33 martial_16 systemd-logind[1307]: System is rebooting.
Aug 26 08:43:00 martial_16 sshd[1430]: Server listening on 0.0.0.0 port 22.
Aug 26 08:43:00 martial_16 sshd[1430]: Server listening on :: port 22.
Aug 26 08:43:00 martial_16 systemd-logind[1403]: New seat seat0.
Aug 26 08:43:00 martial_16 systemd-logind[1403]: Watching system buttons on /dev/input/event0 (Power Button)
Aug 26 08:43:00 martial_16 systemd-logind[1403]: Watching system buttons on /dev/input/event1 (iLO Virtual Keyboard)
Aug 26 08:50:30 martial_16 sshd[1799]: Accepted publickey for martial from 192.168.xxx.xxx port 47586 ssh2: RSA SHA256:FUes2AEaQRiDlwnsAiLHG5fk3dLD44pUbUaV/O5bP48
Aug 26 08:50:30 martial_16 sshd[1799]: pam_unix(sshd:session): session opened for user martial by (uid=0)
Aug 26 08:50:30 martial_16 systemd-logind[1403]: New session 1 of user martial.
Aug 26 08:50:30 martial_16 systemd: pam_unix(systemd-user:session): session opened for user martial by (uid=0)
Aug 26 08:50:33 martial_16 sudo: martial : TTY=pts/0 ; PWD=/home/martial ; USER=root ; COMMAND=/bin/sh -c echo BECOME-SUCCESS-gyrsvpcoojeyrdxdnfzbtcdmnczetbvm ; /usr/bin/python /home/martial/.ansible/tmp/ansible-tmp-1566809430.59-88286744637830/AnsiballZ_setup.py
Aug 26 08:50:33 martial_16 sudo: pam_unix(sudo:session): session opened for user root by martial(uid=0)
Aug 26 08:50:34 martial_16 sudo: pam_unix(sudo:session): session closed for user root
Aug 26 08:50:40 martial_16 sudo: martial : TTY=pts/0 ; PWD=/home/martial ; USER=root ; COMMAND=/bin/sh -c echo BECOME-SUCCESS-aczumvtlxkmxlgagpjyuvwwzqbxocsfl ; /usr/bin/python /home/martial/.ansible/tmp/ansible-tmp-1566809440.58-149274044804498/AnsiballZ_command.py
Aug 26 08:50:40 martial_16 sudo: pam_unix(sudo:session): session opened for user root by martial(uid=0)
Aug 26 08:50:45 martial_16 sudo: pam_unix(sudo:session): session closed for user root
Aug 26 08:51:46 martial_16 sshd[1946]: Received disconnect from 192.168.xxx.xxx port 47586:11: disconnected by user
Aug 26 08:51:46 martial_16 sshd[1946]: Disconnected from user martial 192.168.xxx.xxx port 47586
Aug 26 08:51:46 martial_16 systemd-logind[1403]: Removed session 1.
Aug 26 08:51:46 martial_16 sshd[1799]: pam_unix(sshd:session): session closed for user martial
Aug 26 08:51:46 martial_16 systemd: pam_unix(systemd-user:session): session closed for user martial
Aug 26 09:17:01 martial_16 CRON[2585]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 26 09:17:01 martial_16 CRON[2585]: pam_unix(cron:session): session closed for user root
Aug 26 09:30:49 martial_16 sshd[2597]: Accepted publickey for martial from 192.168.xxx.xxx port 47640 ssh2: RSA SHA256:FUes2AEaQRiDlwnsAiLHG5fk3dLD44pUbUaV/O5bP48
Aug 26 09:30:49 martial_16 sshd[2597]: pam_unix(sshd:session): session opened for user martial by (uid=0)
Aug 26 09:30:49 martial_16 systemd: pam_unix(systemd-user:session): session opened for user martial by (uid=0)
Aug 26 09:30:49 martial_16 systemd-logind[1403]: New session 4 of user martial.
Aug 26 09:30:50 martial_16 sudo: martial : TTY=pts/0 ; PWD=/home/martial ; USER=root ; COMMAND=/bin/sh -c echo BECOME-SUCCESS-eggskhigwccitgbnoruyflbscrwvcwvo ; /usr/bin/python /home/martial/.ansible/tmp/ansible-tmp-1566811849.06-39859284695076/AnsiballZ_setup.py
Aug 26 09:30:50 martial_16 sudo: pam_unix(sudo:session): session opened for user root by martial(uid=0)
Aug 26 09:30:51 martial_16 sudo: pam_unix(sudo:session): session closed for user root
Aug 26 09:31:06 martial_16 sudo: martial : TTY=pts/0 ; PWD=/home/martial ; USER=root ; COMMAND=/bin/sh -c echo BECOME-SUCCESS-etbdgoeuokdsvoqwnwhzwzmvsczmkceg ; /usr/bin/python /home/martial/.ansible/tmp/ansible-tmp-1566811865.75-54316432616203/AnsiballZ_setup.py
Aug 26 09:31:06 martial_16 sudo: pam_unix(sudo:session): session opened for user root by martial(uid=0)
Aug 26 09:31:07 martial_16 sudo: pam_unix(sudo:session): session closed for user root
Aug 26 09:31:25 martial_16 sudo: martial : TTY=pts/0 ; PWD=/home/martial ; USER=root ; COMMAND=/bin/sh -c echo BECOME-SUCCESS-brcibmtjsalxtajvrobpzthzazsqhlzl ; /usr/bin/python /home/martial/.ansible/tmp/ansible-tmp-1566811884.92-46958692214098/AnsiballZ_command.py
Aug 26 09:31:25 martial_16 sudo: pam_unix(sudo:session): session opened for user root by martial(uid=0)
Aug 26 09:31:30 martial_16 sudo: pam_unix(sudo:session): session closed for user root
Aug 26 09:32:30 martial_16 sshd[2688]: Received disconnect from 192.168.xxx.xxx port 47640:11: disconnected by user
Aug 26 09:32:30 martial_16 sshd[2688]: Disconnected from user martial 192.168.xxx.xxx port 47640
Aug 26 09:32:30 martial_16 sshd[2597]: pam_unix(sshd:session): session closed for user martial
Aug 26 09:32:30 martial_16 systemd-logind[1403]: Removed session 4.
Aug 26 09:34:42 martial_16 sshd[2978]: Accepted publickey for martial from 192.168.xxx.xxx port 47684 ssh2: RSA SHA256:FUes2AEaQRiDlwnsAiLHG5fk3dLD44pUbUaV/O5bP48
Aug 26 09:34:42 martial_16 sshd[2978]: pam_unix(sshd:session): session opened for user martial by (uid=0)
Aug 26 09:34:42 martial_16 systemd-logind[1403]: New session 6 of user martial.
Aug 26 09:34:42 martial_16 systemd: pam_unix(systemd-user:session): session opened for user martial by (uid=0)
Aug 26 09:34:44 martial_16 sudo: martial : TTY=pts/0 ; PWD=/home/martial ; USER=root ; COMMAND=/bin/sh -c echo BECOME-SUCCESS-glboglbfzgwgrvlbememtfwefadxrqyq ; /usr/bin/python /home/martial/.ansible/tmp/ansible-tmp-1566812082.74-194345813697618/AnsiballZ_setup.py
Aug 26 09:34:44 martial_16 sudo: pam_unix(sudo:session): session opened for user root by martial(uid=0)
Aug 26 09:34:45 martial_16 sudo: pam_unix(sudo:session): session closed for user root
Aug 26 09:34:57 martial_16 sudo: martial : TTY=pts/0 ; PWD=/home/martial ; USER=root ; COMMAND=/bin/sh -c echo BECOME-SUCCESS-ousxevwixpcyuwsusdsuvupgdqnflwjf ; /usr/bin/python /home/martial/.ansible/tmp/ansible-tmp-1566812097.09-164536619793658/AnsiballZ_setup.py
Aug 26 09:34:57 martial_16 sudo: pam_unix(sudo:session): session opened for user root by martial(uid=0)
Aug 26 09:34:58 martial_16 sudo: pam_unix(sudo:session): session closed for user root
Aug 26 09:35:11 martial_16 sudo: martial : TTY=pts/0 ; PWD=/home/martial ; USER=root ; COMMAND=/bin/sh -c echo BECOME-SUCCESS-zilpybauumwrfrewhhgdvxtkcgmtywhu ; /usr/bin/python /home/martial/.ansible/tmp/ansible-tmp-1566812111.59-139955183910781/AnsiballZ_command.py
Aug 26 09:35:11 martial_16 sudo: pam_unix(sudo:session): session opened for user root by martial(uid=0)
Aug 26 09:35:17 martial_16 sudo: pam_unix(sudo:session): session closed for user root
Aug 26 09:36:17 martial_16 sshd[3069]: Received disconnect from 192.168.xxx.xxx port 47684:11: disconnected by user
Aug 26 09:36:17 martial_16 sshd[3069]: Disconnected from user martial 192.168.xxx.xxx port 47684
Aug 26 09:36:17 martial_16 sshd[2978]: pam_unix(sshd:session): session closed for user martial
Aug 26 09:36:17 martial_16 systemd-logind[1403]: Removed session 6.
Aug 26 10:17:01 martial_16 CRON[3362]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 26 10:17:01 martial_16 CRON[3362]: pam_unix(cron:session): session closed for user root
Aug 26 11:17:01 martial_16 CRON[3372]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 26 11:17:01 martial_16 CRON[3372]: pam_unix(cron:session): session closed for user root
Aug 26 12:17:01 martial_16 CRON[3380]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 26 12:17:01 martial_16 CRON[3380]: pam_unix(cron:session): session closed for user root
Aug 26 13:17:01 martial_16 CRON[3388]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 26 13:17:01 martial_16 CRON[3388]: pam_unix(cron:session): session closed for user root
Aug 26 14:17:01 martial_16 CRON[3400]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 26 14:17:01 martial_16 CRON[3400]: pam_unix(cron:session): session closed for user root
Aug 26 15:17:01 martial_16 CRON[3459]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 26 15:17:01 martial_16 CRON[3459]: pam_unix(cron:session): session closed for user root
Aug 26 16:17:01 martial_16 CRON[3468]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 26 16:17:02 martial_16 CRON[3468]: pam_unix(cron:session): session closed for user root
Aug 26 17:17:01 martial_16 CRON[3476]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 26 17:17:01 martial_16 CRON[3476]: pam_unix(cron:session): session closed for user root
Aug 26 18:17:01 martial_16 CRON[3487]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 26 18:17:01 martial_16 CRON[3487]: pam_unix(cron:session): session closed for user root
Aug 26 19:17:01 martial_16 CRON[3495]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 26 19:17:01 martial_16 CRON[3495]: pam_unix(cron:session): session closed for user root
Aug 26 20:17:01 martial_16 CRON[3506]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 26 20:17:01 martial_16 CRON[3506]: pam_unix(cron:session): session closed for user root
Aug 26 21:17:01 martial_16 CRON[3517]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 26 21:17:01 martial_16 CRON[3517]: pam_unix(cron:session): session closed for user root
Aug 26 22:17:01 martial_16 CRON[3606]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 26 22:17:01 martial_16 CRON[3606]: pam_unix(cron:session): session closed for user root
Aug 26 22:23:01 martial_16 CRON[3612]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 26 22:23:01 martial_16 CRON[3612]: pam_unix(cron:session): session closed for user root
Aug 26 23:17:01 martial_16 CRON[3620]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 26 23:17:01 martial_16 CRON[3620]: pam_unix(cron:session): session closed for user root
Aug 27 00:17:01 martial_16 CRON[3630]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 27 00:17:01 martial_16 CRON[3630]: pam_unix(cron:session): session closed for user root
Aug 27 01:17:01 martial_16 CRON[3689]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 27 01:17:01 martial_16 CRON[3689]: pam_unix(cron:session): session closed for user root
Aug 27 02:17:01 martial_16 CRON[3700]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 27 02:17:01 martial_16 CRON[3700]: pam_unix(cron:session): session closed for user root
Aug 27 03:17:01 martial_16 CRON[3709]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 27 03:17:01 martial_16 CRON[3709]: pam_unix(cron:session): session closed for user root
Aug 27 04:17:01 martial_16 CRON[3719]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 27 04:17:01 martial_16 CRON[3719]: pam_unix(cron:session): session closed for user root
Aug 27 05:17:01 martial_16 CRON[3729]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 27 05:17:01 martial_16 CRON[3729]: pam_unix(cron:session): session closed for user root
Aug 27 06:17:01 martial_16 CRON[3831]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 27 06:17:01 martial_16 CRON[3831]: pam_unix(cron:session): session closed for user root
Aug 27 06:25:01 martial_16 CRON[3836]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 27 06:25:05 martial_16 CRON[3836]: pam_unix(cron:session): session closed for user root
Aug 27 07:17:01 martial_16 CRON[3975]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 27 07:17:01 martial_16 CRON[3975]: pam_unix(cron:session): session closed for user root
Aug 27 08:17:01 martial_16 CRON[3986]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 27 08:17:01 martial_16 CRON[3986]: pam_unix(cron:session): session closed for user root
Aug 27 09:17:01 martial_16 CRON[4011]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 27 09:17:01 martial_16 CRON[4011]: pam_unix(cron:session): session closed for user root
Aug 27 10:17:01 martial_16 CRON[4021]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 27 10:17:01 martial_16 CRON[4021]: pam_unix(cron:session): session closed for user root
Aug 27 11:17:02 martial_16 CRON[4030]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 27 11:17:02 martial_16 CRON[4030]: pam_unix(cron:session): session closed for user root
Aug 27 12:17:01 martial_16 CRON[4039]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 27 12:17:01 martial_16 CRON[4039]: pam_unix(cron:session): session closed for user root
Aug 27 13:17:01 martial_16 CRON[4048]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 27 13:17:01 martial_16 CRON[4048]: pam_unix(cron:session): session closed for user root
Aug 27 13:40:31 martial_16 sshd[4053]: Accepted publickey for martial from 192.168.xxx.xxx port 48330 ssh2: RSA SHA256:FUes2AEaQRiDlwnsAiLHG5fk3dLD44pUbUaV/O5bP48
Aug 27 13:40:31 martial_16 sshd[4053]: pam_unix(sshd:session): session opened for user martial by (uid=0)
Aug 27 13:40:31 martial_16 systemd-logind[1403]: New session 38 of user martial.
Aug 27 13:40:31 martial_16 systemd: pam_unix(systemd-user:session): session opened for user martial by (uid=0)

Dernière modification par Zafl (Le 27/08/2019, à 15:07)

Hors ligne

#9 Le 28/08/2019, à 06:27

bruno

Re : Probleme de connection ssh "Connection reset by peer"

Il n' y a rien d’intéressant dans le auth.log. On y voit seulement des connexions réussies avec ta clé RSA et un playbook ansible.
Je pense que le problème vient du client ou d'un équipement réseau entre le client et le serveur qui perd la connexion avant que l'authentification ne soit complète. Il faudrait savoir quelle carte réseau est utilisée sur le client.

En ligne

#10 Le 02/09/2019, à 09:46

Zafl

Re : Probleme de connection ssh "Connection reset by peer"

Yop ! j'ai fini par trouver la solution !
L'erreur venait du bonding que je faisais a l’installation de la machine coté serveur,
En gros j'avais 2 entrées réseau eno1 et eno2 et c'est en liant les 2 avec un bond que mon erreur se produisait aléatoirement.

Hors ligne