SSH Timeout in centos8 vm

647 views
Skip to first unread message

Diptendu Tan

unread,
Oct 15, 2020, 12:23:22 PM10/15/20
to gce-discussion
Hello There,

I have created a centos 8 vm in gcp and enabled password login.And connecting to the vm via putty. Now after very short time of inactivity, I am getting ssh timeout in putty.
So I have modified the ssh conf as bellow but ssh timeout has not increased. Can someone please help me increase the ssh timeout.

TCPKeepAlive no
#PermitUserEnvironment no
#Compression delayed
ClientAliveInterval 420
ClientAliveCountMax 360

BR,
Diptendu Tan

Tauqeer Ahmad Khan

unread,
Oct 15, 2020, 2:21:07 PM10/15/20
to gce-discussion
Google cloud has a session timeout across the board of 10 minutes, so you need to use a keepalive. Try adding the argument --ssh-flag="-ServerAliveInterval=30" - any value less than 600 should do the trick there. 

For more information you can also see this link [1].

Reply all
Reply to author
Forward
0 new messages