SSH slow and seemingly not responding? I recently had this issue and was surprised at how common it was. To further add to the litany of solutions, I figured I'd repost it again. If your ssh seems slow ESPECIALLY right after submitting the password, add this line:
UseDNS no
to the file:
/etc/ssh/sshd_config
This happened to me (and likely others) because I switched to a static IP on my local network so I could reliably forward the ssh port to the right computer. With a dynamic ip, most routers send the hostname to your computer, but when you use a static ip, you have to set it manually. If it isn't set, ssh goes looking it up in a DNS server and since 192.168.1.XXX is a public IP range, the DNS server doesn't even bother responding and the connection hangs until it times out and the password is finally accepted. In most systems this is exactly 60 seconds or so. By saying UseDNS no, you're telling your system to skip the DNS check that will fail anyway.
Hope this was helpful and please comment away :)!
Post new comment