How to prevent your SSH session from disconnecting in Linux कैसे Linux में रखती से अपने ssh सत्र को रोकने के लिए

by Sukrit Dhandhania on April 16, 2009 Sukrit Dhandhania द्वारा 16 अप्रैल 2009 पर

लिनक्स

Anyone who has worked with a remote Linux server using SSH must have faced the problem of having the SSH session drop dead when you head out to get a cup of coffee. जो कोई एक दूरस्थ लिनक्स ssh का उपयोग कर सर्वर के साथ काम किया है ssh सत्र ड्रॉप मृत होने की समस्या का सामना करना पड़ा होगा, जब तुम बाहर सिर पर एक कप कॉफी ले आओ. Well, here's a solution to help you configure your SSH daemon on the Linux server to stop it from disconnecting. वैसे, यहाँ एक समाधान के लिए आपकी मदद लिनक्स सर्वर पर अपने ssh डेमॉन विन्यस्त इसे बंद से नहीं रोक रहा है. What happens is that if you leave your SSH connection on and don't use it for some time the SSH server goes into an idle mode and kills the session. क्या होता है कि यदि आप अपने ssh संबंधन छोड़ और कुछ समय ssh सर्वर एक निष्क्रिय मोड में चला जाता है और सत्र को मारता के लिए उपयोग कर नहीं. This is really a security measure which can sometimes be a little annoying. यह सच में एक सुरक्षा उपाय है जो कभी कभी थोड़ा कष्टप्रद हो सकता है.

To set this up log on to your remote Linux server using SSH. इस की स्थापना की अपनी रिमोट लिनक्स सर्वर पर लॉग ऑन करें ssh का उपयोग कर. Open the SSH configuration file: खुला ssh विन्यास फाइल:

# vim /etc/ssh/ssh_config # / Etc / ssh / शक्ति / ssh_config

Add the following line at the end of the file: फाइल के अंत में निम्नलिखित पंक्ति जोड़ें:

ServerAliveInterval 60 60 ServerAliveInterval

Save the file and quit the text editor. फ़ाइल सहेजें और पाठ संपादक छोड़ दिया. Now, similarly, open the file ~/.ssh/config . अब, इसी तरह, फ़ाइल को खोलने ~ .ssh / config. Create the file if it does not already exist. फ़ाइल बनाएँ अगर यह पहले से ही मौजूद नहीं है. Add the following lines: निम्नलिखित लाइनों में जोड़ें:

Host * मेजबान *
ServerAliveInterval 60 60 ServerAliveInterval

Note: you need to indent the second line by entering a space at the beginning of the line. नोट: आप एक स्थान में प्रवेश करने से पंक्ति की शुरुआत में दूसरी पंक्ति इंडेंट की जरूरत है.

You're all done now. तुम सब अब कर रहे हैं. Time to restart your SSH server. समय अपने ssh सर्वर पुनः आरंभ करें. Run the following command: निम्नलिखित कमांड चलाएँ:

# /etc/init.d/sshd restart # / Etc / init.d sshd / पुनः आरंभ

This should take a second or two. यह एक दूसरे या दो लेना चाहिए. Then you should be back in business. तो फिर तुम वापस व्यापार में होना चाहिए. What we have done here is that we have pretty much fooled the SSH server into thinking that your SSH session is active even when it's not. क्या हम यहाँ किया है कि हम बहुत ज्यादा सोच कर कि तुम्हारी ssh सत्र सक्रिय भी नहीं है जब यह है में ssh सर्वर मूर्ख बनाया है. Now you can peacefully take a short coffee break without losing your SSH connection. अब तुम शांति से अपने ssh संबंधन को खोने के बिना एक छोटे कॉफी ब्रेक ले सकते हैं.

Related Posts: संबंधित पोस्ट:
  • How to prevent RSI on Windows and Linux with Workrave कैसे Windows और Linux पर RSI Workrave से रोकने के लिए
  • How to recursively copy files from an FTP server with Linux कैसे recursively लिनक्स के साथ एक FTP सर्वर से फ़ाइलों की प्रतिलिपि के लिए
  • How to monitor your Linux machine with netstat कैसे netstat के साथ अपने Linux मशीन पर नजर रखने के लिए
  • How to SSH from your Windows Mobile Smartphone कैसे अपने विंडोज़ मोबाइल Smartphone से ssh को
  • SmallScreenX – simulate screen resolutions in OS X SmallScreenX - ओएस एक्स में स्क्रीन संकल्प अनुकरण
  • Get Simple Help tutorials just like this one in your email inbox every day - for free! बस अपने ईमेल इनबॉक्स के लिए मुफ्त हर दिन - में यह एक तरह सरल सहायता ट्यूटोरियल जाओ! Just enter your email address below: बस नीचे अपना ईमेल पता दर्ज करें:

    You can always opt out of this email subscription at any time. तुम हमेशा इस ईमेल सदस्यता से बाहर किसी भी समय विकल्प चुन सकते हैं.

    { 0 comments… (0 टिप्पणियाँ ... add one now एक अभी जोड़ें } )

    Leave a Comment एक टिप्पणी छोड़ दो

    You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> आप ये HTML टैग और विशेषताएँ: <a href="" उपयोग title=""> <abbr title=""> <acronym कर सकते हैं <blockquote title=""> <b> cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>