[A06] Resolución BUG SSH Legacy en info.rb, conclusión F1 de Compresión XVA, y actualizaciones de métricas y planes.

This commit is contained in:
Ricardo Monla
2026-04-10 19:12:37 -03:00
parent 941da87ed2
commit 15bcf81183
14 changed files with 855 additions and 23 deletions
+31 -2
View File
@@ -22,7 +22,9 @@ module ADN
puerto_ssh: detectar_puerto_ssh(contenido) || 22,
usuario: detectar_usuario(contenido),
clave_boveda: detectar_clave_boveda(contenido),
auth_type: detectar_auth_type(contenido)
auth_type: detectar_auth_type(contenido),
clave_ssh: detectar_clave_ssh(contenido),
ssh_opts: detectar_ssh_opts(contenido)
}
end
@@ -100,8 +102,8 @@ module ADN
# | Sistema Operativo | ... | o - **Sistema Operativo**: ...
if contenido =~ /(?:\||\-)\s*\*\*?(?:Sistema Operativo|SO|OS)\*\*?\s*[:\|]\s*([^\|\n]+)/i
so_raw = $1.strip
return :linux if so_raw =~ /linux|ubuntu|debian|centos|rocky|proxmox|xen/i
return :windows if so_raw =~ /windows|server|win/i
return :linux if so_raw =~ /linux|ubuntu|debian|centos|rocky|proxmox/i
end
:linux # Default
end
@@ -143,6 +145,11 @@ module ADN
end
def self.detectar_auth_type(contenido)
# Detectar 'RSA Legacy' para XenServer 7.0 (OpenSSH 6.6.1)
if contenido =~ /RSA Legacy/i
return :rsa_legacy
end
# Detectar otros tipos de autenticación
if contenido =~ /\*\*SSH\*\*:.*\((Passphrase|Password|RSA)/i
match = $1.downcase
return :passphrase if match == 'passphrase'
@@ -151,5 +158,27 @@ module ADN
end
:password # Default para VMs Windows
end
# Detectar clave SSH específica para el nodo
def self.detectar_clave_ssh(contenido)
# Buscar en formato: **Clave SSH**: `~/.ssh/id_rsa_xen`
if contenido =~ /\*\*Clave SSH\*\*:\s*`?([~a-zA-Z0-9_\-\.\/]+)`?/i
return $1
end
# Fallback: buscar en línea de comando SSH
if contenido =~ /ssh -i ([~a-zA-Z0-9_\-\.\/]+)\s/i
return $1
end
nil
end
# Detectar opciones SSH especiales (para servidores legacy)
def self.detectar_ssh_opts(contenido)
# Buscar opciones -o PubkeyAcceptedAlgorithms o -o HostkeyAlgorithms
if contenido =~ /(-o PubkeyAcceptedAlgorithms=[^\s`]+)\s+(-o HostkeyAlgorithms=[^\s`]+)/i
return "#{$1} #{$2}"
end
nil
end
end
end