Bashrc - SFTP Gives An Error Received Message Too Long and What Is The Reason - Unix & Linux Stack Exchange
Bashrc - SFTP Gives An Error Received Message Too Long and What Is The Reason - Unix & Linux Stack Exchange
unix.stackexchange.com
1 of 8 05/10/2022, 18.58
bashrc - sftp gives an error: "Received message too long" and what is th... about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttps%2Funix.stackexchange.com%2Fquest...
nonopolaritynonopolarity
2,7815 gold badges26 silver badges38 bronze
badges
2
This is a longstanding problem. I found it ten years
ago when I first had to mix commercial SSH at
work and open-SSH at home. I ran into it again
today and found this post.
If I had searched for "sftp/scp fails but ssh is OK" I
would have been reminded of the solution sooner!
2 of 8 05/10/2022, 18.58
bashrc - sftp gives an error: "Received message too long" and what is th... about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttps%2Funix.stackexchange.com%2Fquest...
4
At least for SFTP this can be fixed by using the
internal-sftp subsystem, as that does not
read .bashrc or /etc/motd.
3 of 8 05/10/2022, 18.58
bashrc - sftp gives an error: "Received message too long" and what is th... about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttps%2Funix.stackexchange.com%2Fquest...
KennethKenneth
3793 silver badges3 bronze badges
4
just put following into top of ~/.bashrc on username
of id on remote machine if that id uses bash
4 of 8 05/10/2022, 18.58
bashrc - sftp gives an error: "Received message too long" and what is th... about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttps%2Funix.stackexchange.com%2Fquest...
5 of 8 05/10/2022, 18.58
bashrc - sftp gives an error: "Received message too long" and what is th... about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttps%2Funix.stackexchange.com%2Fquest...
6 of 8 05/10/2022, 18.58
bashrc - sftp gives an error: "Received message too long" and what is th... about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttps%2Funix.stackexchange.com%2Fquest...
Jakuje
20.4k7 gold badges49 silver badges68 bronze
badges
answered Dec 13, 2015 at 22:03
3
There can be one more reason. On RHEL 6 with
openssh-5.3p1-122.el6.x86_64 we have found,
that it behaves wrong when LOCALE remains at
"C". When changed with:
export LC_ALL="en_US.UTF-8"
Then sftp behaves correctly. In the previous
openssh-5.3p1-118 we haven't experienced such a
behaviour so it's probably some minor bug in this
build.
answered Aug 8, 2017 at 13:22
7 of 8 05/10/2022, 18.58
bashrc - sftp gives an error: "Received message too long" and what is th... about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttps%2Funix.stackexchange.com%2Fquest...
badges
1
In my case, to make it work, I needed to disable
Ubuntu's welcome message.
8 of 8 05/10/2022, 18.58