Saca de la configuración de SSH el Time Out, que directamente no venzan las sesiones.


**Inspecting SSH Configuration**

I think I need to look at the SSH config, probably in the pi-config repository. It seems like I might also want to create a task list to keep things organized. The user's request feels direct and simple, which is nice! To move forward, I'll need to locate the configuration file first. I want to make sure I'm thorough in addressing this request, so let's see how to tackle it step by step.

bash

pwd && rg -n "ServerAlive|ClientAlive|TCPKeepAlive|ConnectTimeout|IdleTimeout|Timeout" /home/sebas /mnt/rpi/pi-config /etc/ssh /etc/ssh/sshd_config.d 2>/dev/null

todo

Quitar timeout de sesiones SSH

Encontrar la configuración SSH relevante y dejar las sesiones sin vencimiento por timeout, luego verificar.


Created #1: Quitar timeout de sesiones SSH (pending)

Quitar timeout de sesiones SSH

Quitar timeout de sesiones SSH


**Refining search parameters**

I think I need to narrow down my search a bit more. It feels like my current approach isn't getting me the specific information I need. It's important to focus my queries so I can find more precise results. Maybe I can consider adjusting the keywords or applying filters? Let’s see what works better to direct my search accurately. I just want to make sure I'm being efficient!

bash

set -e
for f in /etc/ssh/sshd_config /etc/ssh/sshd_config.d/* ~/.ssh/config /mnt/rpi/pi-config/**/*ssh* /mnt/rpi/pi-config/**/.ssh*; do
  [ -e "$f" ] || continue
  echo "== $f =="
  grep -nE '^(ClientAliveInterval|ClientAliveCountMax|ServerAliveInterval|ServerAliveCountMax|TCPKeepAlive|ChannelTimeout|UnusedConnectionTimeout|ConnectTimeout|Match)' "$f" 2>/dev/null || true
  echo
done


== /etc/ssh/sshd_config ==

== /etc/ssh/sshd_config.d/50-cloud-init.conf ==

== /etc/ssh/sshd_config.d/99-idle-4h.conf ==
1:ClientAliveInterval 60
2:ClientAliveCountMax 240


Updated #1 (pending → in_progress)

Quitar timeout de sesiones SSH


**Editing SSH configuration**

I need to edit the file, likely in /etc/ssh/sshd_config.d/99-idle-4h.conf. The user says there should be no session timeout, so I might consider setting the ClientAliveInterval to 0 and possibly ignoring CountMax. I should verify using `sshd -t` and reload the service, but I wonder about the impact of reloading—it's reversible, but I want to make sure it's okay to do. Alright, let's proceed!

write

ClientAliveInterval 0


EACCES: permission denied, open '/etc/ssh/sshd_config.d/99-idle-4h.conf'


bash

set -e
printf 'ClientAliveInterval 0\n' | sudo tee /etc/ssh/sshd_config.d/99-idle-4h.conf >/dev/null
sudo sshd -t
sudo systemctl reload ssh
printf 'Updated:\n'
sudo cat /etc/ssh/sshd_config.d/99-idle-4h.conf


Updated:
ClientAliveInterval 0


Updated #1 (in_progress → completed)

Quitar timeout de sesiones SSH


Listo.

Cambio aplicado:
- `/etc/ssh/sshd_config.d/99-idle-4h.conf` → `ClientAliveInterval 0`

También:
- validé con `sshd -t`
- recargué `ssh`

Resultado: SSH ya no corta sesiones por ese idle timeout del servidor.