Server Fault is a question and answer site for system and network administrators. 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

I've been doing some work on one of our school's servers (as a student), and I've been having some trouble scp-ing files in and out. Trying to push/pull a file from the server while logged in on my local machine

user@localHost$ scp <user>@<schoolServ>:<file> .

doesn't work and causes the terminal to hang indefinitely. However, I have no problems ssh-ing to the remote machine, and trying the transfer from the other direction

user@schoolServ$ scp <file> <user>@<localHost>:~/.

works fine. I've tried three different machines (OS X & Linux) to no effect. Any ideas what might cause this to happen?

share|improve this question
up vote 1 down vote accepted

Scp might have a verbose option, try that and see what it shows. I had a similar issue once and turned out that some commands in .profile or .bashrc on the target machine were writing out a blank line with non printing chars. That caused an issue with the ssl handshake

share|improve this answer
Aha! Bingo! Somehow a .rc file got configured to initialize everything for csh, then threw it all away to start up bash which messed everything up. Found & nuked the offending line, and everything works fantastically now. Thanks! – Connor Glosser Sep 11 '10 at 3:44

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.