Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 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
up vote 2 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


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.