diff --git a/internal/sshserver/sessionhandler.go b/internal/sshserver/sessionhandler.go index 5da1e3b..0d85ba1 100644 --- a/internal/sshserver/sessionhandler.go +++ b/internal/sshserver/sessionhandler.go @@ -97,14 +97,19 @@ func getSSHIntent(sftp bool, cmd []string) []string { // handler is that the command is set to sftp-server. This implies that the // target container must have a sftp-server binary installed for sftp to work. // There is no support for a built-in sftp server. -func sessionHandler(log *slog.Logger, c K8SAPIService, - sftp, logAccessEnabled bool) ssh.Handler { +func sessionHandler( + log *slog.Logger, + c K8SAPIService, + sftp, + logAccessEnabled bool, +) ssh.Handler { return func(s ssh.Session) { sessionTotal.Inc() ctx := s.Context() log := log.With(slog.String("sessionID", ctx.SessionID())) log.Debug("starting session", - slog.Any("rawCommand", s.Command()), + slog.Any("command", s.Command()), + slog.String("rawCommand", s.RawCommand()), slog.String("subsystem", s.Subsystem()), ) // parse the command line arguments to extract any service or container args