WinSCP: SFTP: Received to large (....B) SFTP pachet

Locked
User avatar
Mihai Romania
Posts: 60
Joined: 2023 May 03, 14:12
Location: ROMANIA
Contact:

WinSCP: SFTP: Received to large (....B) SFTP pachet

Post by Mihai »

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

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
Comment the following in the file

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
Reinit the configuration

Code: Select all

[root @ linux ~]$ source ~/.bashrc
I'm on LinkedIn
Locked