Files
fn_registry/functions/infra/ssh_upload.md
T
egutierrez 560cbf280e feat: funciones SSH para infra — conn, check, exec, download, upload, tunnel
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>
2026-04-02 22:03:41 +02:00

900 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_upload function go infra 1.0.0 impure func SSHUpload(conn SSHConn, localPath, remotePath string) error Sube un archivo local al host remoto via scp.
ssh
scp
upload
file
transfer
remote
ssh_conn_go_infra
false error_go_core
fmt
os/exec
strings
true
upload y download roundtrip
functions/infra/ssh_transfer_test.go functions/infra/ssh_upload.go

Ejemplo

conn := SSHConn{Host: "192.168.1.100", User: "deploy", KeyPath: "~/.ssh/id_ed25519"}
err := SSHUpload(conn, "./config.yaml", "/home/deploy/app/config.yaml")

Notas

Usa scp con -P para el puerto (distinto a ssh que usa -p). Para subir directorios, usar SSHExec con tar/rsync como alternativa.