get2knowio / get2knowio/remo

Add SSH readiness wait for AWS auto-start in shell_connect

Open
#10 0 comments 0 reactions 0 assignees View on GitHub
tech-debt
Dominant language
Python
Stars
2
Forks
0
Avg merge
15h 59m
Merged PRs (30d)
9

Description

## Description

When `shell_connect()` auto-starts a stopped AWS instance, it calls `aws_start()` which waits for the instance to be running and gets the new IP. However, there's a potential timing issue:

1. Instance starts and gets a new public IP
2. `save_known_host` updates the known_hosts file
3. SSH connection is attempted immediately

The SSH daemon on the instance may not be ready yet even though the instance state is "running". The SSM path already has a wait loop for the SSM agent, but the direct SSH path doesn't wait for port 22 to be available.

## Recommended fix

Add a `wait_for_ssh()` helper that polls port 22 with a timeout before attempting the SSH connection.

## Priority

Low — users can just retry the connection.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.