feat: Update 2 files
All checks were successful
Build-Test-Publish / build (linux/amd64) (push) Successful in 44s
Build-Test-Publish / build (linux/arm64) (push) Successful in 1m21s

This commit is contained in:
Your Name
2025-08-29 19:54:53 +12:00
parent 6a77e538dd
commit 764ea2b03c
2 changed files with 70 additions and 28 deletions

View File

@@ -165,7 +165,11 @@ namespace dropshell
return false;
std::stringstream ssh_cmd;
ssh_cmd << "ssh -p " << ssh_info.get_port() << " " << (hasFlag(mode, cMode::Interactive) ? "-tt " : "")
// Add ConnectTimeout to prevent long waits on unreachable servers
// Use shorter timeout (3s) for non-interactive, longer (10s) for interactive
int timeout = hasFlag(mode, cMode::Interactive) ? 10 : 3;
ssh_cmd << "ssh -o ConnectTimeout=" << timeout << " -p " << ssh_info.get_port() << " "
<< (hasFlag(mode, cMode::Interactive) ? "-tt " : "")
<< ssh_info.get_user() << "@" << ssh_info.get_host();
std::string remote_bb64_path;