Help Center> Cloud Phone Host> FAQs> SSH Tunnel Faults> How Do I Keep an SSH Session Uninterrupted?
Updated on 2022-11-29 GMT+08:00

How Do I Keep an SSH Session Uninterrupted?

Description

If you do not perform any operation for a long time when accessing a cloud phone, the SSH session may time out and exit. If you have accessed the cloud phone through ADB, you cannot run adb shell commands after exiting due to timeout.

Handling Method

Add -o ServerAliveInterval=30 to the command for setting up an SSH tunnel. The complete command is as follows:

ssh -L Local idle port:Cloud phone listening IP address: SSH tunnel username@Public IP address -i Private key file path -o ServerAliveInterval=30 -Nf

ServerAliveInterval=30 indicates that the local SSH client sends the keep-alive packet to the SSHD server every 30 seconds to maintain the session.

SSH Tunnel Faults FAQs

more