समस्या यह हो सकती है कि एसएसएच से कनेक्ट करने का प्रयास कर रहा है सभीwww.google.com
विभिन्न आईपी को हल करता है। उदाहरण के लिए मेरी मशीन पर:
# ssh -v -o ConnectTimeout=1 -o ConnectionAttempts=1 www.google.com
OpenSSH_5.9p1, OpenSSL 0.9.8t 18 Jan 2012
debug1: Connecting to www.google.com [173.194.43.20] port 22.
debug1: connect to address 173.194.43.20 port 22: Connection timed out
debug1: Connecting to www.google.com [173.194.43.19] port 22.
debug1: connect to address 173.194.43.19 port 22: Connection timed out
debug1: Connecting to www.google.com [173.194.43.18] port 22.
debug1: connect to address 173.194.43.18 port 22: Connection timed out
debug1: Connecting to www.google.com [173.194.43.17] port 22.
debug1: connect to address 173.194.43.17 port 22: Connection timed out
debug1: Connecting to www.google.com [173.194.43.16] port 22.
debug1: connect to address 173.194.43.16 port 22: Connection timed out
ssh: connect to host www.google.com port 22: Connection timed out
यदि मैं इसे एक विशिष्ट आईपी के साथ चलाता हूं, तो यह बहुत तेज़ हो जाता है।
संपादित: मैं इसे समय समाप्त हो गया है (time
के साथ) और परिणाम हैं:
- www.google.com - 5.086 सेकंड
- 173.94.43.16 - 1.054 सेकंड
एसएसएच दस्तावेज़ों से: "डिफ़ॉल्ट सिस्टम टीसीपी टाइमआउट का उपयोग करने के बजाय एसएसएच सर्वर से कनेक्ट करते समय उपयोग किए गए टाइमआउट (सेकेंड में) निर्दिष्ट करने के लिए इसका उपयोग करें। यह मान तभी उपयोग किया जाता है जब लक्ष्य नीचे या वास्तव में पहुंच योग्य नहीं होता है, न कि जब यह कनेक्शन से इंकार कर देता है। " – Adi