We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff590f1 commit 75f2002Copy full SHA for 75f2002
1 file changed
packages/pam/local/ssh-proxy.go
@@ -269,7 +269,13 @@ func (p *SSHProxyServer) gracefulShutdown() {
269
270
log.Debug().Msg("SSH proxy shutdown complete")
271
272
- os.Exit(p.sshExitCode)
+ // Only propagate SSH exit code in exec mode (non-interactive)
273
+ // For interactive sessions, always exit 0 on clean shutdown
274
+ exitCode := 0
275
+ if p.options.ExecCommand != "" {
276
+ exitCode = p.sshExitCode
277
+ }
278
+ os.Exit(exitCode)
279
})
280
}
281
0 commit comments