Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 4 down vote accepted

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

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.

share|improve this answer
problem is solved, last time I put echo "some text" in my ~/.bashrc. thanks. – souravc Nov 2 '13 at 8:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.