Skip to content

Commit d801b92

Browse files
committed
max SSH session duration
1 parent 4f0f0da commit d801b92

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

src/content/docs/cloudflare-one/connections/connect-networks/use-cases/ssh/ssh-infrastructure-access.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,16 @@ To set up the Logpush job, refer to [Logpush integration](/cloudflare-one/insigh
155155

156156
## Known limitations
157157

158+
### SSH features
159+
158160
The following SSH features are not supported:
159161

160162
- `sftp` commands
161163
- `scp` commands that utilize OpenSSH versions > 9.0, because OpenSSH 9.0+ leverages `sftp` to execute the command
162164
- Local and remote port forwarding
163165
- SSH agent forwarding
164166
- X11 forwarding
167+
168+
### Session duration
169+
170+
SSH sessions have a maximum expected duration of 10 hours. For more information, refer to the [Troubleshooting FAQ](/cloudflare-one/faq/troubleshooting/#long-lived-ssh-sessions-frequently-disconnect).

src/content/docs/cloudflare-one/faq/troubleshooting.mdx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,3 +374,18 @@ Get-ChildItem -Path "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP" -Recurse
374374
## I get an `Invalid session. Please try logging in again.` error from Access when trying to log in to the Cloudflare dashboard via SSO.
375375

376376
Cloudflare Access uses a [`CF_Session` cookie](/cloudflare-one/identity/authorization-cookie/#access-cookies) to validate that the same browser both initiated and completed your sign-in. The `Invalid session` error means Access was unable to validate this cookie. Ensure that there is no software or firewall on your device or network that may be interfering with requests to Access.
377+
378+
## Long-lived SSH sessions frequently disconnect.
379+
380+
All SSH connections proxied through Cloudflare Gateway, including traffic to [Access for Infrastructure](/cloudflare-one/connections/connect-networks/use-cases/ssh/ssh-infrastructure-access/) targets, have a maximum expected duration of 10 hours. This is because Gateway terminates connections over 10 hours when releasing service updates; releases are not scheduled and can occur multiple times a week. To ensure a consistent user experience, you can configure your environment to automatically terminate sessions over 10 hours. For example, you could require users to sign in once a day so that connections do not cut off unexpectedly during the work day.
381+
382+
One option is to add [`ControlPersist`](https://man.openbsd.org/ssh_config#ControlPersist) to your personal (`~/.ssh/config`) or global (`/etc/ssh/ssh_config`) SSH client configuration file:
383+
384+
```txt
385+
Host *
386+
ControlMaster auto
387+
ControlPath ~/.ssh/control_sockets/%r@%h:%p
388+
ControlPersist 10h
389+
```
390+
391+
`ControlPersist` will close inactive SSH connections on the client machine after the specified time period.

0 commit comments

Comments
 (0)