I have a curious problem with OpenSSH in SLES 12 SP4 Linux servers.
We install a customized OpenSSH on ourservers, so in each machine we have two versions of OpenSSH, the official package of the operating system and the one that we have compiled.
For the case of SLES 12 SP4 if we run the following command from another server
scp -r directory/. destination_server:/path/to/directory
the following error arises
scp: error: unexpected filename: .
We have verified that the problem is with the scp binary under /usr/bin/scp, which is run by our OpenSSH instead of its scp under its own path.
After searching and testing the solution applied is to remove the execution rights on /usr/bin/scp, so our version of OpenSSH can not use it, and the scp -r from the client works perfectly.
Is there a more elegant to way to tell to the daemon to use the scp binary under its own path instead of /usr/bin/scp?
Best regards