Post by Neil W RickertPost by jonathanI just noticed whilst copying items that scp sources my cshrc file, goes through
the tcshrc file as well - just to copy some files.
1) why?
It is part of unix security, that commands are executed using your
login shell.
Your shell sources these files on startup.
This is because the "scp" function rely lives on top of "ssh", which uses a
shell. Also, the .tcshrc or .profile or other .files depending on your shell
may set alternative $HOME or umask settings on an individual user basis.
This would affect the behavior of both ssh and scp.
Post by Neil W RickertPost by jonathan2) how do I stop this from happening?
Maybe change to a different shell. Or delete the files that you
don't want sourced.
Or check in your .tcshrc if you're in an interactive session (look for a
$TERM) before executing whatever bit of fun is interfering with your scp
sessions. I've seen way, way, way too many badly written .cshrc files that
interfere with ssh and scp and cvs or rsync over ssh because they spewed
"announcements" for no reason on non-interactive connections.