disabling local-to-local transfers?

Francois Ouellet franco at sol.mpact.tv
Tue Jul 28 03:55:02 AEST 2026


Le Friday, 24 July 2026, 16:48:28 EDT Samuel Thibault a écrit :
> Theo de Raadt, le ven. 24 juil. 2026 14:15:44 -0600, a ecrit:
> > Samuel Thibault <samuel.thibault at ens-lyon.org> wrote:
> > > I have never asked for changing the default. I just asked for being able
> > > to configure it.

Here's a simple solution to your problem, for a bash shell, that doesn't need any source change :

mkdir ~/scp-bin
cat > ~/scp-bin/cp <<EOF
#!/bin/sh

echo "no local copy allowed" >&2

exit 1
EOF
chmod 755 ~/scp-bin/cp

alias scp="PATH=~/scp-bin:$PATH scp"






More information about the openssh-unix-dev mailing list