• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar
  • Skip to footer

The Geek Diary

HowTos | Basics | Concepts

  • Solaris 11
  • Solaris
    • SVM
    • ZFS
    • Zones
    • LDOMs
    • Hardware
  • Linux
    • CentOS/RHEL 7
    • RHCSA notes
    • SuSE Linux Enterprise
    • Linux Services
  • VxVM
  • VCS
  • Interview Questions
  • oracle
    • ASM
    • mysql
    • RAC
    • oracle 12c
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting

How to disable timeout in ssh during login prompt (login session inactivity) in Linux

By admin

You are one of those guys who need more time while putting in the credentials during ssh logins, but due to the login session inactivity timeout, you are not able to login into the system in time.

# time ssh -l testuser server01
Password:
Connection closed by 192.168.10.10

real    2m06.000s
user    0m0.015s
sys     0m0.004s

This short note lists steps to disable the login session timeout in ssh.

Types of inactivity timeouts

There are 2 types of inactivity timeouts.

  1. login session inactivity: This is before you log in and you are at the Login: prompt.
  2. shell session inactivity: This is after you login and the session is left unattended.

Disabling login session inactivity during ssh login

1. Please put “LoginGraceTime 0” into /etc/ssh/sshd_config.

# vi /etc/ssh/sshd_config
LoginGraceTime 0

2. Restart the ssh service for the changes to take effect.

# service sshd restart

This will disable the auto disconnection. If you do not want to disable the auto disconnect, you can increase the time for auto disconnect to a sufficiently large value. Just set the seconds after “LoginGraceTime” parameter.

Filed Under: Linux

Some more articles you might also be interested in …

  1. CentOS / RHEL 7 : How to configure cache-only nameserver
  2. How to install and configure sosreport under CentOS / RHEL
  3. CentOS / RHEL 6 : How to change the verbosity of debug logs during booting
  4. How to manage File and Directory Permissions/Ownerships in Linux
  5. How To Open A Port In CentOS / RHEL 7
  6. RHEL 7 – RHCSA Notes – input / output redirection
  7. CentOS / RHEL 6 : How to force a NTP sync with the NTP server(s)
  8. CentOS / RHEL : How to exclude kernel or other packages from getting updated using YUM Versionlock Plugin
  9. How to create and mount Btrfs file system (explained with examples)
  10. CentOS / RHEL 6 : How to disable Transparent Huge pages (THP)

You May Also Like

Primary Sidebar

Recent Posts

  • Linux OS Service ‘smartd’
  • Oracle SQL script to Show current Users and SQL being Executed
  • How to use qperf to measure network bandwidth and latency performance in Linux
  • How to Password Protect GRUB2 in Oracle Enterprise Linux 7
  • How to move or rename a datafile in the same ASM diskgroup (Using ASM alias)

Footer

Cheat Sheets

  • LDOMs (OVM for SPARC) Command line reference
  • Solaris Volume Manager (SVM) command line reference
  • Solaris ZFS command line reference
  • RHEL 7 – RHCSA Notes (Cheat Sheets)
  • CentOS / RHEL 7 : firewalld Cheat Sheet
  • systemd command line reference (cheat sheet)

Solaris interview questions

  • The ultimate Solaris Volume Manager (SVM) interview questions
  • The ultimate Solaris zones (containers) interview questions
  • The ultimate Solaris networking interview questions
  • The ultimate ZFS interview questions
  • Archives
  • Contact Us
  • Copyright

© 2018 · The Geek Diary