using InnovEnergy.Lib.Utils; using InnovEnergy.Lib.Victron.VictronVRM; using static System.ConsoleColor; namespace InnovEnergy.RemoteSupportConsole; public static class VpnConnection { public static async Task Open(Installation installation, IReadOnlyList details) { var machineSerial = details.MachineSerial(); // DEPRECATED var installationId = installation.UniqueId; var vpnIp = await VpnInfo.LookUpIp(installationId, machineSerial); // look up by InstallationId OR machineSerial if (String.IsNullOrWhiteSpace(vpnIp)) return 1; "Starting VPN connection with ".Write(); installation.Name.WriteLine(Green); Console.WriteLine(); return await Ssh.Interactive(vpnIp, installation.Name, "root", "22"); } }