nedeľa 17. mája 2020

Disconnecting of putty?

Some people has a problem with putty. They connect to server via putty. When they do nothing, putty automaticly disconnect their. Problem is not a putty but configuration on ssh server.





How it works?

putty --ssh client --- from my windows PC to remote server via ssh protocol

ssh server --- ssh server in remote server 



ssh server has sshd_config. In this config is "clientaliveinterval"

Example:

root@kamikadze:~# sshd -T | grep -i clientaliveinterval
clientaliveinterval 300 


(You see 300 seconds)

If user is connect and doing nothing, after 300 seconds (5 minutes) will be disconnect from server.


If you are administrator of this server, you will change clientaliveinterval to more time.

After change this option, please restart ssh server.


- option 0 = no disconnect

root@guliverkel:/home/martin# sshd -T | grep -i clientaliveinterval
clientaliveinterval 0


System V - /etc/init.d/sshd restart

systemD - systemctl restart sshd





root@guliverkel:/home/martin# systemctl status sshd
● ssh.service - OpenBSD Secure Shell server
   Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2020-05-17 10:28:08 CEST; 4s ago
 Main PID: 6473 (sshd)
   CGroup: /system.slice/ssh.service
           └─6473 /usr/sbin/sshd -D


Souruce: https://www.thegeekdiary.com/centos-rhel-how-to-setup-session-idle-timeout-inactivity-timeout-for-ssh-auto-logout/

Žiadne komentáre:

Zverejnenie komentára