send exit-status to client after sftp done

tls
fangdingjun 6 years ago
parent 2e364939bd
commit 10125aea13

@ -114,13 +114,16 @@ func serveSFTP(ch ssh.Channel) {
if err != nil {
log.Debugf("start sftp server failed: %s", err)
ch.SendRequest("exit-status", false, ssh.Marshal(exitStatus{Status: 127}))
return
}
if err := server.Serve(); err != nil {
log.Debugf("sftp server finished with error: %s", err)
ch.SendRequest("exit-status", false, ssh.Marshal(exitStatus{Status: 127}))
return
}
ch.SendRequest("exit-status", false, ssh.Marshal(exitStatus{Status: 0}))
}
type directTcpipMsg struct {

Loading…
Cancel
Save