server: simplify code and improve readability
server: simplify code and improve readability

fuchsia-mirror/third_party-github.com-pkg-sftp,fuchsia-mirror/third_party-pkg-sftp,akupas/sftp,pkg/sftp,ScriptRock/sftp