I've had the same bug on a few of my SSH sessions and found out that for all of them where I had this specific issue it was because in one of my sourced SETUP.bash (in .bashrc on the remote server) there was an echo line.
For example:
in my .bashrc I would have the following:
source /home/ilt/SETUP.bash
and in /home/ilt/SETUP.bash
I would have:
echo 'hello 123'
Removing the echo line fixes the problem.
I've had the same bug on a few of my SSH sessions and found out that for all of them where I had this specific issue it was because in one of my sourced SETUP.bash (in .bashrc on the remote server) there was an echo line.
For example:
in my .bashrc I would have the following:
source /home/ilt/ SETUP.bash
and in /home/ilt/ SETUP.bash
I would have:
echo 'hello 123'
Removing the echo line fixes the problem.