RH: SSH Client side connection timeout

Getting tired of waiting till ssh connection timeout kicks in ?

There are 2 solutions to this issue :

1. Create ~/.ssh/config file

 

# touch ~/.ssh/config
# chmod 600 ~/.ssh/config

Overall solution

# vi ~/.ssh/config

ConnectTimeout          3
ConnectionAttempts     2

Per Host solution

# vi ~/.ssh/config

Host www.google.com
ConnectTimeout          3
ConnectionAttempts     2

2. Commandline solution :

# ssh -o ConnectTimeout=3 -o ConnectionAttempts=3 www.google.com

 

Leave a comment

Your email address will not be published.


*


Fix this before you comment on this post * Time limit is exhausted. Please reload the CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.