https://bugzilla.mindrot.org/show_bug.cgi?id=3660
Jim Knoble <jmknoble@pobox.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jmknoble@pobox.com
--- Comment #1 from Jim Knoble <jmknoble@pobox.com> ---
In your $HOME/.profile or $HOME/.bashrc add the following function:
scp() {
case "$*" in
*:*|*-h|'')
command scp ${1:+"$@"}
;;
*)
echo "scp: error: Use cp(1) to copy files locally" >&2
return 1
;;
esac
}
(Warning: untested).
That should put a safety on your footgun without modifying the scp
binary, *and* it will work on just about any version of scp.
If you need a fancier footgun safety, consider a Python script that
wraps the scp command and appears earlier on $PATH.
--
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs
Jim Knoble <jmknoble@pobox.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jmknoble@pobox.com
--- Comment #1 from Jim Knoble <jmknoble@pobox.com> ---
In your $HOME/.profile or $HOME/.bashrc add the following function:
scp() {
case "$*" in
*:*|*-h|'')
command scp ${1:+"$@"}
;;
*)
echo "scp: error: Use cp(1) to copy files locally" >&2
return 1
;;
esac
}
(Warning: untested).
That should put a safety on your footgun without modifying the scp
binary, *and* it will work on just about any version of scp.
If you need a fancier footgun safety, consider a Python script that
wraps the scp command and appears earlier on $PATH.
--
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs