SSH & Remote Administration
Stop your SSH sessions from hanging on bad DNS lookups
đ§© The Challenge
Have you ever tried to ssh into a box and just stared at the blinking cursor for thirty seconds while it tries to resolve a reverse lookup for an IP that doesnât exist? It drives me absolutely up the wall when Iâm in a rush.
đĄ The Fix
You can tell your local SSH client to stop trying to be clever with DNS lookups and just connect directly. It saves you from waiting on timeouts that feel like they take an eternity.
ssh -o UseDNS=no user@hostname
âïž Why It Works
By flipping that option to no, the client skips the reverse DNS lookup process that usually triggers these delays on misconfigured internal networks. Youâre essentially telling the daemon to stop querying the resolver for client info it doesnât actually need to verify.
đ Pro-Tip: Drop âUseDNS noâ into your ~/.ssh/config file for that specific host alias and youâll never have to type the flag again.
Linux Tips & Tricks | © ngelinux.com | 10/25/2026
