Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to set up a regular scp between two linux based systems (one with SLC5, other running Ubuntu). I seem to be able to happily copy in one direction, but not the other. Copying from the Ubuntu to SLC5 machine via scp does not always fail but seems to hang randomly. Running scp -v the command always hangs at the same point:

 Executing: program /usr/bin/ssh host feynman.hpc.susx.ac.uk, user   
 mm613, command scp -v -t ~/snoplus/db/testrelay/  OpenSSH_5.3p1   
 Debian-3ubuntu7, OpenSSL 0.9.8k 25 Mar 2009  debug1: Reading   
 configuration data /etc/ssh/ssh_config debug1: Applying options for *
 debug1: Connecting to feynman.hpc.susx.ac.uk [139.184.80.19] port 22. 
 debug1: Connection established.  debug1: identity file   
 /home/mjmottram/.ssh/identity type -1  debug1: identity file   
 /home/mjmottram/.ssh/id_rsa type -1  debug1: identity file   
 /home/mjmottram/.ssh/id_dsa type 2  debug1: Checking blacklist file   
 /usr/share/ssh/blacklist.DSA-1024  debug1: Checking blacklist file   
 /etc/ssh/blacklist.DSA-1024

Anyone got any ideas of what's going on? /etc/ssh/blacklist.DSA-1024 does not exist on either machine, and sometimes I am able to copy a number of files before this error appears and the command hangs.

share|improve this question
    
When it doesn't hang, what's the next line? (This will tell us what it's trying to do when it hangs.) –  David Schwartz Oct 13 '11 at 13:00
    
When it doesn't hang, the next few lines (with -vvv verbose mode) are: >>>debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3 >>>debug1: match: OpenSSH_4.3 pat OpenSSH_4* >>>debug1: Enabling compatibility mode for protocol 2.0 >>>debug1: Local version string SSH-2.0-OpenSSH_5.3p1 Debian-3ubuntu7 –  radpotato Oct 13 '11 at 13:50
    
I believe that means you are waiting for the SSH server to send its banner. This probably means TCP wrappers is hanging, possibly due to DNS or however it decides whether to allow a connection to proceed or not. –  David Schwartz Oct 13 '11 at 13:57
    
Ultimately I want to place all the scp commands within a Python script, as I have thousands of files to copy and log with a database.. the hanging is a real issue - is there a way to force an error message after hanging at this stage (the Python script has no way of differentiating between a hang and slow/large file transfer at the moment).... –  radpotato Oct 13 '11 at 14:03
    
It will already generate an error if it times out. If it hasn't timed out, there hasn't been any error, so no reason to generate one. As soon as it knows whether it is hanging or not, it will tell you. A better solution is to find and fix the hang. (Check TCP wrappers on the other machine, hosts.allow/hosts.deny files, DNS, and so on.) –  David Schwartz Oct 13 '11 at 14:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.