Weird quirk of Linux that sent me on several wild goose chases today: if your shell’s .bashrc file is not perfectly quiet (i.e. no output at all), SFTP connections will mysteriously fail with confusing error messages. A line with “tabs -4” was the cause.
— Charles Johnson (@Green_Footballs) November 13, 2020
I actually solved this by switching the sshd service to use the “internal-sftp” subsystem instead of “sftp-server.”
I could have just changed “tabs -4” to “tabs -4 > /dev/null” but now I don’t need to worry about output from .bashrc at all.
(I know, total geek-out.)— Charles Johnson (@Green_Footballs) November 13, 2020