Getting "Received too large SFTP packet" when logging in with Root using WinSCP to Google Compute Engine virtual machine instance

Received too large SFTP packet. Max supported packet size is 102400 B

Cause: This problem can arise when your .bashrc file is printing data to the screen (e.g.archey, screenfetch). The .bashrc file runs every time any console shell is initialized.

enter image description here

Solution: Simply move any scripts that generate output from your .bashrc file to your .bash_profile. The .bash_profile only runs when you create a physical shell session.


NOTE: Just for anyone who comes across this and simply wants to copy files and doesn't matter what file protocol they use. You can just switch file protocol from SFTP to SCP to avoid this issue. Thought it might be worth a mention.


If you used Ubuntu linux and try to connect the server then "Please login as the Ubuntu user" you should sftp as the ubuntu user, not as root.

Try that, hope it will work for you!

Thanks!