From 579278b4ded9cbb2f26bc3d78b75b3fe3a22b6eb Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Sat, 2 Dec 2023 21:11:24 -0700 Subject: [PATCH] sftp: log ip on inbound connection failure --- sftp/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sftp/server.go b/sftp/server.go index cd12e60..6b97703 100644 --- a/sftp/server.go +++ b/sftp/server.go @@ -107,7 +107,7 @@ func (c *SFTPServer) Run() error { go func(conn net.Conn) { defer conn.Close() if err := c.AcceptInbound(conn, conf); err != nil { - log.WithField("error", err).Error("sftp: failed to accept inbound connection") + log.WithField("error", err).WithField("ip", conn.RemoteAddr().String()).Error("sftp: failed to accept inbound connection") } }(conn) }