Skip to content

iOS Session Management

iOS imposes restrictions on background execution that can cause SSH sessions to disconnect when ZestSSH is not in the foreground. This page explains the limitations and best practices.

iOS aggressively suspends background apps to conserve battery and memory. When ZestSSH goes to the background (e.g., you switch to another app), iOS may suspend the app after a short period, causing the SSH connection to drop.

This is an iOS platform limitation, not a ZestSSH bug. All SSH clients on iOS face this challenge.

ZestSSH uses available iOS background execution APIs to keep sessions alive as long as possible. However, iOS does not guarantee unlimited background time for third-party apps.

  • Use Split View or Slide Over on iPad to keep ZestSSH visible while using another app.
  • On iPhone, minimize the time spent in other apps if you need to keep a session active.

Enable keep-alive in your connection settings. While this does not prevent iOS from suspending the app, it helps quickly detect and re-establish connections after the app returns to the foreground.

ZestSSH saves your session state. When you return to the app after suspension:

  1. The app detects the connection was dropped.
  2. You can quickly reconnect by tapping the connection.

If you need to step away briefly, locking the screen (rather than switching to another app) may give you slightly more background time in some iOS versions.

Consider running persistent terminal sessions on the server that survive client disconnections:

  • tmux: Run tmux after connecting, and use tmux attach to reattach after reconnection.
  • screen: Run screen and use screen -r to reattach.

This way, even if the iOS connection drops, your work on the server is preserved.

For commands that do not require an interactive session, use iOS Shortcuts to run commands quickly without needing to keep a long-lived session open.