Improve SSH diagnostics in lab status command
This commit is contained in:
parent
38bc909c6a
commit
9274ab1e17
1 changed files with 5 additions and 4 deletions
|
@ -140,10 +140,11 @@ writeShellScriptBin "lab" ''
|
||||||
|
|
||||||
# Test SSH connectivity with debug info if in verbose mode
|
# Test SSH connectivity with debug info if in verbose mode
|
||||||
if [[ $verbose -eq 1 ]]; then
|
if [[ $verbose -eq 1 ]]; then
|
||||||
log "Testing LAN connection to $machine..."
|
log "Testing SSH connection to $machine (LAN)..."
|
||||||
${openssh}/bin/ssh -v -o ConnectTimeout=2 -o BatchMode=yes "$ssh_user@$machine" "echo OK" || true
|
${openssh}/bin/ssh -v -o ConnectTimeout=5 -o BatchMode=yes "$ssh_user@$machine" "echo ✓ SSH connection to $machine successful" 2>&1 | grep -E '(debug1|Authentication|Connection)'
|
||||||
log "Testing Tailscale connection to $machine.tailnet..."
|
|
||||||
${openssh}/bin/ssh -v -o ConnectTimeout=2 -o BatchMode=yes "$ssh_user@$machine.tailnet" "echo OK" || true
|
log "Testing SSH connection to $machine.tailnet (Tailscale)..."
|
||||||
|
${openssh}/bin/ssh -v -o ConnectTimeout=5 -o BatchMode=yes "$ssh_user@$machine.tailnet" "echo ✓ SSH connection to $machine.tailnet successful" 2>&1 | grep -E '(debug1|Authentication|Connection)'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Try with normal SSH first (for LAN)
|
# Try with normal SSH first (for LAN)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue