disabling local-to-local transfers?
Brian Candler
b.candler at pobox.com
Sat Jul 25 18:27:37 AEST 2026
On 25/07/2026 02:05, Damien Miller wrote:
> for av in "$@" ; do
> if test -z "$_flagsdone" ; then
> case "$av" in
> -*) continue ;;
> *) _flagsdone=1 ;;
> esac
> fi
> case "$av" in
> *:*) _remote=1 ;;
> esac
> done
That's a rough heuristic. I think that properly parsing scp arguments is
hard, e.g.
scp -J 2001:db8::1 foo bar
A fully-functional wrapper would likely have to duplicate the entire
argument parsing code from scp.
FWIW: I've had a few cases over the years of accidentally creating local
file copies, and I've never *intentionally* used scp for local copying.
If the proposed feature were available, I'd certainly turn it on in my
own ~/.ssh/config. But it hasn't caused me sufficient pain to warrant
pushing the point any further. It's clear that key developers of OpenSSH
are fundamentally opposed, and I respect that.
More information about the openssh-unix-dev
mailing list