Tuesday, April 27, 2010

SFTP: Received message too long 1936094320

The problem:

Recently the server running SFTP was updated with some security patches applied. Soon afterwards, one of the users couldn't connect via SFTP with the following error:


$ sftp broken_user@server

Received message too long 1936094320


 I spent quite a bit of time searching for solutions and most talked about an echo statement in one of the .bashrc or .bash_profile scripts. However, upon inspection I couldn't find any echo statements.

However, I noticed that when I used the root user it worked fine:


$ sftp root@server 

 The solution:

I did manage to find a workaround, although I am still unable to explain why it works.
I ended up editing the /etc/passwd file and changed a line from:


broken_user:x:503:503::/var/websites/my_website/./:/bin/sftpsh

to

broken_user:x:503:503::/var/websites/my_website/./:/bin/bash

No comments:

Post a Comment