Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I frequently scp my file to remote host. But suddenly it started taking more than 30 seconds to copy 20kb file.It used to take not more than half a second. After referring to some blog I appended

UseDNS no in /etc/ssh/ssh_config .

But now while I scp it gives

/etc/ssh/ssh_config: line 61: Bad configuration option: UseDNS

share|improve this question

2 Answers 2

up vote 1 down vote accepted

UseDNS no should be on the server's /etc/ssh/sshd_config (not ssh_config). It has no meaning in ssh_config.

share|improve this answer

did you check your name servers ? Did the one or two DNS resolvers on top of the /etc/resolv.conf file is/are inaccessible for some reason ?

grep ^nameserver /etc/resolv.conf

try to ping the IP addresses of the nameservers. Most probably the top one is not going to respond, for which you are waiting for 30 seconds to timeout. Hence your 30 seconds delay. If you are the server admin, i.e., have root access, either delete this nameserver or push it down to become lower importance.

share|improve this answer

Your Answer

 
discard

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.