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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -270,7 +270,7 @@ func (c Configuration) AcceptInboundConnection(conn net.Conn, config *ssh.Server
}
sconn, chans, reqs, err := ssh.NewServerConn(conn, config)
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 {
logger.ConnectionFailedLog("", utils.GetIPFromRemoteAddress(remoteAddr.String()), "no_auth_tryed", err.Error())
metrics.AddNoAuthTryed()