• Actividad en archivo auth.log

    From Rick Gutierrez@21:1/5 to All on Wed Aug 23 15:00:01 2023
    Saludos lista, alguien usando debian 12 qué pueda verificar si en el
    archivo auth.log esta la actividad de las conexiones ssh, estoy revisando
    una instalación qué hice y veo que no registra la actividad de las
    conexiones ssh, active el loglevel a verbose y tampoco logro qué funcione?

    También revise el rsyslog y veo que la línea qué refiere a la aunteticacion esta ahí.

    auth,authpriv.* /var/log/auth.log


    Alguna idea
    🤔
    --
    rickygm

    http://gnuforever.homelinux.com

    Saludos lista, alguien usando debian 12 qué pueda verificar si en el archivo auth.log esta la actividad de las conexiones ssh, estoy revisando una instalación qué hice y veo que no registra la actividad de las conexiones ssh, active el loglevel a
    verbose y tampoco logro qué funcione?<div dir="auto"><br></div><div dir="auto">También revise el rsyslog y veo que la línea qué refiere a la aunteticacion esta ahí.</div><div dir="auto"><br></div><div dir="auto"><div><pre style="margin:0px 0px calc(
    1.5em);padding:var(--su12);border:0px;font-style:normal;font-variant-caps:normal;font-weight:400;font-stretch:inherit;line-height:var(--lh-md);font-size-adjust:inherit;font-kerning:inherit;font-variant-alternates:inherit;font-variant-ligatures:inherit;
    font-variant-numeric:inherit;font-variant-east-asian:inherit;font-feature-settings:inherit;font-size:var(--fs-body1);vertical-align:baseline;box-sizing:inherit;width:auto;max-height:600px;overflow:auto;border-ra
  • From Roberto =?iso-8859-1?Q?C=2E_S=E1nch@21:1/5 to Rick Gutierrez on Wed Aug 23 16:00:01 2023
    On Wed, Aug 23, 2023 at 08:53:45AM -0400, Rick Gutierrez wrote:
    Saludos lista, alguien usando debian 12 qu� pueda verificar si en el
    archivo auth.log esta la actividad de las conexiones ssh, estoy revisando
    una instalaci�n qu� hice y veo que no registra la actividad de las
    conexiones ssh, active el loglevel a verbose y tampoco logro qu� funcione?
    Tambi�n revise el rsyslog y veo que la l�nea qu� refiere a la
    aunteticacion esta ah�.

    En auth.log veo una gran cantidad de mensajes parecido a esto:

    2023-08-23T09:48:32.417117-04:00 build01 sshd[3701736]: User root from 103.81.86.208 not allow
    ed because not listed in AllowUsers
    2023-08-23T09:48:32.685843-04:00 build01 sshd[3701736]: Received disconnect from 103.81.86.208
    port 42522:11: Bye Bye [preauth]
    2023-08-23T09:48:32.686043-04:00 build01 sshd[3701736]: Disconnected from invalid user root 10
    3.81.86.208 port 42522 [preauth]

    auth,authpriv.* /var/log/auth.log

    Y tengo lo mismo en /etc/rsyslog.conf.

    Tiene que haber algo de mal con tu configuraci�n, pero nos har�a falta
    ver /etc/ssh/sshd_config y /etc/rsyslog.conf (o cualquier cosa que
    tienes debajo /etc/rsyslog.d/) para poder prestarte mejor ayuda.

    Saludos,

    -Roberto

    --
    Roberto C. S�nchez

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rick Gutierrez@21:1/5 to All on Wed Aug 23 18:00:02 2023
    El mié, 23 ago 2023 a las 9:54, Roberto C. Sánchez
    (<[email protected]>) escribió:


    En auth.log veo una gran cantidad de mensajes parecido a esto:

    2023-08-23T09:48:32.417117-04:00 build01 sshd[3701736]: User root from 103.81.86.208 not allow
    ed because not listed in AllowUsers
    2023-08-23T09:48:32.685843-04:00 build01 sshd[3701736]: Received disconnect from 103.81.86.208
    port 42522:11: Bye Bye [preauth]
    2023-08-23T09:48:32.686043-04:00 build01 sshd[3701736]: Disconnected from invalid user root 10
    3.81.86.208 port 42522 [preauth]

    auth,authpriv.* /var/log/auth.log

    Y tengo lo mismo en /etc/rsyslog.conf.

    Tiene que haber algo de mal con tu configuración, pero nos haría falta
    ver /etc/ssh/sshd_config y /etc/rsyslog.conf (o cualquier cosa que
    tienes debajo /etc/rsyslog.d/) para poder prestarte mejor ayuda.


    esta es la parte de configuracion de mi sshd_config , fuera de eso no
    tengo una configuracion especial ni nada.

    Include /etc/ssh/sshd_config.d/*.conf

    #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
    LogLevel VERBOSE

    # Authentication:

    #LoginGraceTime 2m
    PermitRootLogin yes
    #StrictModes yes
    MaxAuthTries 3
    #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)
    KbdInteractiveAuthentication 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 KbdInteractiveAuthentication and
    # PasswordAuthentication. Depending on your PAM configuration,
    # PAM authentication via KbdInteractiveAuthentication may bypass
    # the setting of "PermitRootLogin prohibit-password".
    # If you just want the PAM account and session checks to run without
    # PAM authentication, then enable this but set PasswordAuthentication
    # and KbdInteractiveAuthentication to 'no'.
    UsePAM yes

    #AllowAgentForwarding yes
    #AllowTcpForwarding yes
    #GatewayPorts no
    X11Forwarding yes
    #X11DisplayOffset 10
    #X11UseLocalhost yes
    #PermitTTY yes
    PrintMotd yes
    #PrintLastLog yes
    #TCPKeepAlive yes
    #PermitUserEnvironment no
    #Compression delayed
    #ClientAliveInterval 0
    #ClientAliveCountMax 3
    #UseDNS no
    #PidFile /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


    lo interesante es que si hago un journalctl -u ssh , veo cantidad de
    ataques conexiones a mi ssh , pero no lo registra el auth.log

    Aug 23 09:16:30 relay.srv sshd[18068]: error:
    kex_exchange_identification: Connection closed by remote ho>
    Aug 23 10:29:18 relay.srv sshd[19783]: fatal: Timeout before
    authentication for 42.51.227.67 port 25073
    Aug 23 10:47:21 relay.srv sshd[20293]: error:
    kex_exchange_identification: Connection closed by remote ho>
    Aug 23 11:37:39 relay.srv sshd[21528]: error:
    kex_exchange_identification: banner line contains invalid c>
    Aug 23 11:37:51 relay.srv sshd[21542]: fatal: userauth_pubkey: parse
    publickey packet: incomplete message>
    Aug 23 12:29:23 relay.srv sshd[22814]: fatal: Timeout before
    authentication for 178.74.61.156 port 57086
    Aug 23 13:07:27 relay.srv sshd[23768]: error: maximum authentication
    attempts exceeded for root from 43.1>
    Aug 23 13:07:38 relay.srv sshd[23780]: error: maximum authentication
    attempts exceeded for root from 43.1>
    Aug 23 15:21:28 relay.srv sshd[27144]: fatal: Timeout before
    authentication for 42.225.45.222 port 46344
    Aug 23 15:23:44 relay.srv sshd[27240]: fatal: Timeout before
    authentication for 187.73.238.82 port 9190


    saludos

    --
    rickygm

    http://gnuforever.homelinux.com

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?utf-8?B?Q2FtYWxlw7Nu?=@21:1/5 to All on Wed Aug 23 20:10:01 2023
    El 2023-08-23 a las 08:53 -0400, Rick Gutierrez escribió:

    Saludos lista, alguien usando debian 12 qué pueda verificar si en el
    archivo auth.log esta la actividad de las conexiones ssh, estoy revisando
    una instalación qué hice y veo que no registra la actividad de las conexiones ssh, active el loglevel a verbose y tampoco logro qué funcione?

    También revise el rsyslog y veo que la línea qué refiere a la aunteticacion
    esta ahí.

    auth,authpriv.* /var/log/auth.log


    Alguna idea

    Sólo un apunte... en la nueva versión de Debian (12) ha habido cambios
    en cómo se gestionan los registros, y son cambios GORDOTES (spoiler: journalctl fagocita a rsylog):

    5.1.7. Changes to system logging https://www.debian.org/releases/stable/amd64/release-notes/ch-information.en.html#changes-to-system-logging

    Mira si SSHD puede verse afectado.

    Saludos,

    --
    Camaleón

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Roberto =?iso-8859-1?Q?C=2E_S=E1nch@21:1/5 to Rick Gutierrez on Wed Aug 23 21:20:01 2023
    On Wed, Aug 23, 2023 at 11:49:52AM -0400, Rick Gutierrez wrote:

    lo interesante es que si hago un journalctl -u ssh , veo cantidad de
    ataques conexiones a mi ssh , pero no lo registra el auth.log

    Ahora me doy cuenta que tu mensaje original indic� �instalaci�n�. En mi
    caso, el sistema es viejo y ha sido actualizado a bookworm a trav�s de
    varias versions anteriores de Debian (desde hace ya muchos a�os). Si
    instalaste el sistema neevo, entonces seguro que todo estar� debajo
    journalctl y no syslog (como dijo Camale�n).

    Saludos,

    -Roberto

    --
    Roberto C. S�nchez

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rick Gutierrez@21:1/5 to All on Wed Aug 23 21:40:02 2023
    El mié, 23 ago 2023 a las 15:18, Roberto C. Sánchez
    (<[email protected]>) escribió:


    Ahora me doy cuenta que tu mensaje original indicó «instalación». En mi caso, el sistema es viejo y ha sido actualizado a bookworm a través de varias versions anteriores de Debian (desde hace ya muchos años). Si instalaste el sistema neevo, entonces seguro que todo estará debajo journalctl y no syslog (como dijo Camaleón).

    es correcto , te comento que no simpatizo mucho con journalctl , creo
    que es el hermano de systemd.


    --
    rickygm

    http://gnuforever.homelinux.com

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rick Gutierrez@21:1/5 to [email protected] on Thu Aug 24 05:00:01 2023
    On Wed, Aug 23, 2023 at 3:55 PM Camaleón <[email protected]> wrote:

    E
    Sólo un apunte... en la nueva versión de Debian (12) ha habido cambios
    en cómo se gestionan los registros, y son cambios GORDOTES (spoiler: journalctl fagocita a rsylog):

    5.1.7. Changes to system logging

    https://www.debian.org/releases/stable/amd64/release-notes/ch-information.en.html#changes-to-system-logging

    Mira si SSHD puede verse afectado.

    Saludos,


    Si así es, todo los log se fueron a journalctl, voy a ver si puedo
    habilitar los log con rsyslog, hay mucha gente quejándose de esa parte en debían 12.


    --
    Camaleón

    Slds --
    rickygm

    http://gnuforever.homelinux.com

    <div><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 23, 2023 at 3:55 PM Camaleón &lt;<a href="mailto:[email protected]">[email protected]</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:
    0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex" dir="auto">E<br>
    Sólo un apunte... en la nueva versión de Debian (12) ha habido cambios <br> en cómo se gestionan los registros, y son cambios GORDOTES (spoiler: <br> journalctl fagocita a rsylog):<br>

    5.1.7. Changes to system logging<br>
    <a href="https://www.debian.org/releases/stable/amd64/release-notes/ch-information.en.html#changes-to-system-logging" rel="noreferrer" target="_blank">https://www.debian.org/releases/stable/amd64/release-notes/ch-information.en.html#changes-to-system-
    logging</a><br>

    Mira si SSHD puede verse afectado.<br>

    Saludos,<br>
    </blockquote><div dir="auto"><br></div><div dir="auto">Si así es, todo los log se fueron a journalctl, voy a ver si puedo habilitar los log con rsyslog, hay mucha gente quejándose de esa parte en debían 12.</div><div dir="auto"><br></div><blockquote
    class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex" dir="auto"><br>
    -- <br>
    Camaleón <br>

    </blockquote></div></div>Slds <span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">rickygm<br><br><a href="http://gnuforever.homelinux.com" target="_blank">http://gnuforever.homelinux.
    com</a></div>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)