sftpd: set failed connection loglevel to debug (#152)

This commit is contained in:
Antoine Deschênes
2020-08-06 15:20:31 -04:00
committed by GitHub
parent 91dcc349de
commit 9a15a54885

View File

@@ -270,7 +270,7 @@ func (c Configuration) AcceptInboundConnection(conn net.Conn, config *ssh.Server
} }
sconn, chans, reqs, err := ssh.NewServerConn(conn, config) sconn, chans, reqs, err := ssh.NewServerConn(conn, config)
if err != nil { if err != nil {
logger.Warn(logSender, "", "failed to accept an incoming connection: %v", err) logger.Debug(logSender, "", "failed to accept an incoming connection: %v", err)
if _, ok := err.(*ssh.ServerAuthError); !ok { if _, ok := err.(*ssh.ServerAuthError); !ok {
logger.ConnectionFailedLog("", utils.GetIPFromRemoteAddress(remoteAddr.String()), "no_auth_tryed", err.Error()) logger.ConnectionFailedLog("", utils.GetIPFromRemoteAddress(remoteAddr.String()), "no_auth_tryed", err.Error())
metrics.AddNoAuthTryed() metrics.AddNoAuthTryed()