rodrigosantosbr

[Linux] Aumentar o tempo de sessão do SSH

Dec 28th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!

Resumo

Este artigo explica como aumentar o tempo de inatividade de uma sessão SSH

Passo-a-passo

Edite o arquivo /etc/ssh/ssh_config

sudo nano /etc/ssh/sshd_config

E acrescente no final a seguinte linha

# The ssh connection session will be terminated after 7200*3=21600 second

TCPKeepAlive yes
ClientAliveInterval 7200
ClientAliveCountMax 3

Para confirmar:

grep -i alive /etc/ssh/sshd_config

Para finalizar convém que faça um restart ao serviço sshd, usando o seguinte comando:

sudo service ssh restart
Add Comment
Please, Sign In to add comment