Question:
How do I troubleshoot scp timeouts when ssh and sftp seem to work fine?
tc0nn
2009-11-13 13:48:17 UTC
Keep in mind, ssh works fine... I can run top all day long and never get disconnected. SFTP works fine too! This problems only effects SCP. When I try to SCP a file, it begins tranferring and every time, within 30 seconds it will reset the scp session. A debug of scp looks like this:
.....
debug2: channel 0: rcvd adjust 81920
debug2: channel 0: rcvd adjust 81920
debug2: channel 0: rcvd adjust 81920
debug2: channel 0: rcvd adjust 73728
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
#0 client-session (t4 r0 i0/8192 o0/0 fd 4/5 cfd -1)

debug3: channel 0: close_fds r 4 w 5 e 6 c -1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
Read from remote host attmatdc3wapi01: Connection timed out
debug1: Transferred: stdin 0, stdout 0, stderr 61 bytes in 8.6 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 7.1
debug1: Exit status -1
debug1: compress outgoing: raw data 11219574, compressed 11223746, factor 1.00
debug1: compress incoming: raw data 1715, compressed 937, factor 0.55
lost connection

There are two Juniper ISG2000 firewalls connected to both devices. No other users on these firewalls complain about this issue so I can only assume it's only effecting my networks.

So the question is... What steps would you suggest taking to troubleshoot this issue?
Three answers:
RA
2009-11-13 15:19:15 UTC
These two lines...



--> Read from remote host attmatdc3wapi01: Connection timed out

--> lost connection



...give a hint. The first thing I would try is forcing a longer timeout condition with the "-o ConnectTimeout=xx" option.



scp -o ConnectTimeout=60 user@server /blablablah



Warning: Not all versions of scp accept this option.



For verification, you may want to trace the connection with a packet sniffer (such as www.wireshark.org) and see what happens at the network layer (lost or duplicate packets or packets arriving too late, etc).



If the timeout condition still occurs with longer timeout settings, it's probably an scp to ssh implementation/incompatibility issue and I would load a new or different scp client.
lyssa
2016-11-01 02:09:33 UTC
Ssh Timeout Server Not Responding
phegley
2016-12-03 07:51:27 UTC
My canines (now in simple terms approximately 2) additionally had this unusual subject perfect from the day I have been given her at 7weeks previous. i attempted all varieties of methods I resorted to feeding her dried food and putting it on a plastic mat somewhat than in a bowl this labored for some days, yet (stupidly) I even hand fed her as i had to make helpful she could consume. I asked suggestion from my vet and her respond replaced into that my domestic dog replaced into being a princess and that i replaced into spoiling her. LOL i replaced into informed that she would desire to head 2 days without food. i replaced into stated to in basic terms positioned the food down, provide her time to consume and if she did not in simple terms %. the food up and don't feed her lower back til next dinner time. This helped me to cease annoying and reinforce up. So I in simple terms positioned the food in a small plastic cat bowl, stopped making a fuss of her and left it there. I gave her a at an identical time as and if she did not consume it complicated! I had yet another canines lower back then and if the food replaced into left there long sufficient she could go and consume it that taught my domestic dog to consume or go hungry. She did finally advance and now wolfs her food down in minutes! nevertheless even to at present she continues to be fussy over which bowl i take advantage of and could not consume or drink out of a silver colored or bright bowl!


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...