Thursday, July 12, 2012

Avoid slow SSH response using POB

Here is a quick POB recipe that you can run remotely in those servers taking unbearable 10 seconds to respond to a simple remote ssh command (including login).
#!/bin/bash -e
# ssh-config.sh

#Avoid slow SSH response due to reverse client IP lookup
sed -i "/UseDNS/d" /etc/ssh/sshd_config && bash -c "echo 'UseDNS no' >> /etc/ssh/sshd_config"
service ssh restart

No comments:

Followers