Sometimes ssh works but scp does not. One reason is having a print in your .bashrc or .profile. See: https://superuser.com/questions/395356/why-doesn-t-scp-work-while-ssh-does has a discussion of this issue.