Our team decided to add a welcome banner to all our hosts. A team member, instead of adding the message in /etc/motd
added the message with echo
in ~/.cshrc
.
This is breaking scp
between the hosts. Can someone explain how this is breaking scp
? Is cshrc
loaded even when you do scp
? And how will some echo messages in it break it?
I am not aware of the internal workings of scp
.
The message we added in ~/.cshrc
:
echo "##############################################################################"
echo " Alert! Aler! Alert! Alert! Alert! Alert!"
echo "This is a restricted box, any actions performed here will be reported to xxx@yyy.com"
echo "##############################################################################"
Best Answer
Commands running on top of the
ssh
transport do not expect large amounts of output before they can start their server. This will affect a number of utilities.The solution is to have your administration team print the message only if stdout is connected to a terminal.
Better still, you wouldn't put this in
.cshrc
at all, but instead the message content itself would go in/etc/issue.net
, which is displayed before login. This may need enabling in/etc/ssh/sshd_config
though, with a line like this: