WinSCP: SFTP: Received to large (....B) SFTP pachet
Posted: 2023 May 03, 21:19
The number ... represents the first four bytes when reading the server. If the authentication script prints words, they will be the first 4 characters expressed in a number, and not a message to establish an SFTP connection.
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
Comment the following in the file
Reinit the configuration
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