Ubuntu – Sftp connection failed, strange error messsage

command linenetworkingsftp

While I am trying to connect to a remote system from terminal using sftp

sftp user@host.ip.address

connection is failing and a message coming

Received message too long < some long number >

I connect that machine frequently, can not understand what is causing the problem.

Best Answer

Maybe you have to do with a message (like welcoming message) popping up after the successful login. sftp fails to connect in this situation (see http://www.openssh.org/faq.html#2.9).

Try to ssh in the same server and see if any message pops up. It should be started from one of these file ~/.profile, ~/.bash_profile,~/.bashrc, or other shell initialization file. You can then comment out the respective line from there.

Related Question