Filter files received on scp server

Jon Earle earlej at
Fri Aug 4 07:32:51 AEST 2017

Hey folks,

For reasons, I am trying to restrict what files the scp server will accept.

I've been running "/usr/sbin/sshd  -D -ddd -e" to try to debug what exactly is going on, program flow, etc, but I am not seeing the information I want.  I have tracked the flow to sshd calling 'scp -t .', but I cannot seem to proceed from that point.

I cannot seem to get any log or debug or any information out of the spawned scp process.  I got one debug message from sshd (just before it spawns the scp chile) echoed to my -client- machine, no idea why that happened, but, I would love to be able to sprinkle some prints and things throughout scp so I can see what is happening.

Further adding to my confusion, the debug output from sshd is emitting many messages from channel and session methods, during the file transfer, so I am not sure what is going on.  I would love to see an architecture document but I doubt that exists.  LOL

I also found an issue "" which added logging to ssh. I was trying to add it myself, by calling log_init, then using the debug method, scp does not produce any output.

So, either I did it wrong, or scp is not used on the server at all, to transfer files.

So, I am hoping to receive a little guidance on where I should be focusing my attention and changes.

Many thanks!


More information about the openssh-unix-dev mailing list