Usually this error appears after modifying the bashrc file /etc/bashrc. This error can be avoided either by passing the configuration from the bashrc file to the user's bash_profile, or by commenting with the # character the lines that change the printing mode at login, and after what is done to transfer files with WinSCP, the bashrc file can be changed on the spot.
We have the following login print configuration
Code: Select all
PS1='\[\033[04;37m\]\u @ \[\033[02;36m\]\h\[\033[03;31m\] VM: \[\033[02;32m\]\w \[\033[02;33m\] #\[\033[00m\] '
export PROMPT_COMMAND="echo -n \[\$(date +%H:%M:%S)\]\ "
echo -e "\n${BRed}Users logged on:$NC " ; w -hs |
cut -d " " -f1 | sort | uniq
Code: Select all
# PS1='\[\033[04;37m\]\u @ \[\033[02;36m\]\h\[\033[03;31m\] VM: \[\033[02;32m\]\w \[\033[02;33m\] #\[\033[00m\] '
# export PROMPT_COMMAND="echo -n \[\$(date +%H:%M:%S)\]\ "
# echo -e "\n${BRed}Users logged on:$NC " ; w -hs |
# cut -d " " -f1 | sort | uniq
Code: Select all
[root @ linux ~]$ source ~/.bashrc