6d0d63cb23
Conjunto completo de funciones SSH para operaciones remotas: conexión, verificación de host, ejecución de comandos, transferencia de archivos (upload/download) y gestión de túneles. Incluye tipo SSHConn y tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1008 B
1008 B
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, tested, tests, test_file_path, file_path
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | tested | tests | test_file_path | file_path | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ssh_check | function | go | infra | 1.0.0 | impure | func SSHCheck(conn SSHConn) error | Verifica conectividad SSH ejecutando un comando noop en el host remoto. Timeout de 5 segundos. |
|
|
false | error_go_core |
|
true |
|
functions/infra/ssh_check_test.go | functions/infra/ssh_check.go |
Ejemplo
conn := SSHConn{Host: "192.168.1.100", User: "deploy"}
if err := SSHCheck(conn); err != nil {
log.Fatal("no se puede conectar:", err)
}
Notas
Usa BatchMode=yes para fallar inmediatamente si requiere input interactivo (password prompt). ConnectTimeout=5 para no bloquear si el host no responde. StrictHostKeyChecking=accept-new acepta hosts nuevos automaticamente.