It's a year later, so guess this isn't a directly useful answer, but I just encountered a similar problem and, since this is one of the very few places online to mention the scp / TERM variable problem, I thought I'd post the solution I found.
My problem was that in my .bashrc file I had used the "clear" shell builtin command to refresh the terminal, but the "dumb" terminal type used by scp doesn't support that operation, hence the (rather misleading) error. The answer was to only execute the "clear" if the terminal is not "dumb":
## in .bashrc
test "dumb" != $TERM && clear
## as opposed to just calling "clear" without thinking about terminal support
I initially tried to solve this by only calling clear from within an "if [ $PS1 ]; then ..." block (to detect an interactive shell) but that didn't work on all machines... some systems still set the PS1 variable even if it isn't an interactive shell.
You may also need to do a similar protection on the "trap" command, if you use that to clear the terminal on logout from a remote machine.
Hope that's helpful to someone, eventually!