Hi,
I’m trying to scp some files over to a remote host, however it seems to be failing as the /etc/bash.bashrc.local prints some extra lines when it detects a remote session. Here’s the contents of that file:
# Terminal colours
lightcyan="\e[0;36m"
reset="\e[m"
# SSH colour
if [ -n "$SSH_CONNECTION" ];
then
_IP=$SSH_CONNECTION; _IPa=(${_IP// / });
echo -e "
Welcome to $lightcyan${HOST}$reset (${_IPa[2]}:${_IPa[3]})";
echo -e "You are connecting from ${_IPa[0]}
";
PS1="\$lightcyan\]${PS1}\$reset\]";
unset _IP _IPa
fi;
scp’ing a file gives this:
ak@i-ghost:~> scp file.sh laptop:/home/ak/bin
Welcome to suse-laptop (10.2.10.197:22)
ak@i-ghost:~>
I know the echos are a problem, as commenting them out temporarily fixed the issue, as seen here:
ak@i-ghost:~> scp file.sh laptop:/home/ak/bin
file.sh 100% 84 0.1KB/s 00:00
ak@i-ghost:~>
Is there any way around this?
Thanks in advance.