disabling local-to-local transfers?

Jochen Bern Jochen.Bern at binect.de
Sat Jul 25 02:43:59 AEST 2026


Am 24.07.26 um 13:19 schrieb Samuel Thibault:
>    scp foo my.server.com
> forgetting to type the trailing ':' creates a "my.server.com" file
> instead of producing an error.
[...]
> Could there at least be an option which we can put in one's default
> config or shell aliases to disable the local-to-local transfer and
> produce an error instead?


begin 755 NonLocalSCPWrapperScript
M(R$O8FEN+W-H"@IS8W`@(B1`(@I.3TY?3U!424]./69A;'-E"D%,3%],3T-!
M3#UT<G5E"G=H:6QE(%L@)", at +6=T(#`@73L at 9&\*"6-A<V4@(B0Q(B!I;@H)
M"2TJ*0DZ(#L["2, at 3W!T:6]N+"!S:VEP"@D)*CHJ*0DC("I,;V]K<RH@;&EK
M92!R96UO=&4@<&%T:`H)"0E.3TY?3U!424]./71R=64*"0D)3$%35#TB)#$B
M"@D)"6EF(%L@(2`M92`B)#$B(%T[('1H96X*"0D)"4%,3%],3T-!3#UF86QS
M90H)"0EF:2`[.PH)"2HI"2, at 4W5S<&5C="!T:&5S92P@=&]O/PH)"0E.3TY?
M3U!424]./71R=64*"0D)3$%35#TB)#$B"@D)"6EF(%L@(2`M92`B)#$B(%T[
M('1H96X*"0D)"4%,3%],3T-!3#UF86QS90H)"0EF:2`[.PH)97-A8PH)3$%3
M5#TB)#$B"@ES:&EF=`ID;VYE"B1.3TY?3U!424].('Q\(&5X:70@,`DC($1I
M9"!S;VUE;VYE(&1O(&%N(")S8W`@+2UH96QP(C\*)$%,3%],3T-!3"!\?"!E
M>&ET(#`*96-H;R`B15)23U(Z($%L;"!P871H97,@<V5E;2!T;R!B92!L;V-A
M;"P at 9&ED('EO=2!F;W)G970 at 82`G.B<_(@IE8VAO(")3=7-P96-T960@;&]C
M86P@=&%R9V5T+"!E>'!A;F1E9"!F<F]M("<D3$%35"<Z(@IL<R`M;"`B)$Q!
?4U0B('P@<V5D("UE("=S+UXO("`@+R<*97AI="`Q"@``
`
end



$ echo "stuff" > foo
$ bin/nl_scp foo bar
ERROR: All pathes seem to be local, did you forget a ':'?
Suspected local target, expanded from 'bar':
    -rw-r--r--. 1 bern bern 6 24. Jul 18:34 bar
$ bin/nl_scp foo bar host:
foo                            100%    6     0.2KB/s   00:00
bar                            100%    6     0.2KB/s   00:00
$ bin/nl_scp host:bar baz
bar                            100%    6     0.1KB/s   00:00
$ mkdir org
$ bin/nl_scp foo bar baz org
ERROR: All pathes seem to be local, did you forget a ':'?
Suspected local target, expanded from 'org':
    total 12
    -rw-r--r--. 1 bern bern 6 24. Jul 18:35 bar
    -rw-r--r--. 1 bern bern 6 24. Jul 18:35 baz
    -rw-r--r--. 1 bern bern 6 24. Jul 18:35 foo
$ bin/nl_scp -o CheckHostIP
usage: scp [-346ABCOpqRrsTv] [-c cipher] [...]



Add/automate the 'rm -rf "$LAST"' at your own risk.

Kind regards,
-- 
Jochen Bern
Systemingenieur
Binect GmbH
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4336 bytes
Desc: Kryptografische S/MIME-Signatur
URL: <http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20260724/102556fb/attachment-0001.p7s>


More information about the openssh-unix-dev mailing list