# SFTP client, "Received message too long 1416128883"

## Tennessee_Rebel

When I try to use sftp and connect to a remote website, I'm getting the "Received message too long 1416128883" error after adding its RSA key to the list contained in .ssh/known_hosts.  I can't find anything on searching this forum for that error code and when I tried googling it there was only some sketchy information that said SFTP doesn't like echoes in my .bashrc file.  But after commenting out the only echoes in it which are "PROMPT_COMMAND= ... ", the problem still remains.  

My ssh_config file is the default for Gentoo 2007.1, with nothing added.

What else could be causing this problem?  I'm reasonably sure the web server supports SFTP logins.

(forget it, I'm now using FTP to log in to the server and it works fine.)

----------

## didymos

What's in you're .bashrc and .bash_profile files?  You may want to have a look at this:

http://autosys.us/misc/sftp_received_message_too_long.html

----------

## Tennessee_Rebel

 *Quote:*   

> 
> 
> # /etc/skel/.bashrc:
> 
> #
> ...

 

 *Quote:*   

> 
> 
> # /etc/skel/.bash_profile
> 
> # This file is sourced by bash for login shells.  The following line
> ...

 

The stuff in that link isn't working.  I'm still having the same problem.

----------

## romax

Something is definitively outputting characters, which confuses the sftp client. Look for anythings which spoils "This" as it's first bytes.

1416128883 = 0x54686973

```

echo 54686973 | xxd -r -p

This

```

Difficult to track down, you might want to look into the sftp server source. Had a similiar issue with http://www.minstrel.org.uk/papers/sftp/.

----------

## Tennessee_Rebel

 *romax wrote:*   

> you might want to look into the sftp server source. Had a similiar issue with http://www.minstrel.org.uk/papers/sftp/.

 

The server ... source?  

*scratches head*

I'm not trying to build my own server and have people connect to it.

----------

## didymos

Still, since the server implements sftp, you can see what input triggers these sorts of errors, which may help you track down the client-side of the problem.

----------

## Tennessee_Rebel

@didymos:  Okay, I'll try that and post whether or not it worked.

PS, when I connect to the server through ssh like so:

```

ssh user@server -s -oForwardX11=no -oForwardAgent=no -oProtocol=2 sftp

```

I get the message "This account is currently not available."

But when I use sftp normally, the debug output indicates that it has accepted my password and is starting an interactive session before it gets all the "Received message too long" junk.

----------

## romax

 *Quote:*   

> I get the message "This account is currently not available." 

 

That is what I meant to say - the weird error message can be translated into a couple of characters, which form the string "This" - meaning you get the same error message with sftp as you get with ssh, which starts with "This account is"...

You probably have set the user's account shell to /sbin/nologin in /etc/passwd. Setting it to e.g. /bin/bash would work, or if you want to prevent logins and allow scp/rsync only, use scponly or for sftp you can use something along the lines of the link I posted further up.

----------

