diff --git a/Core/Remote/PiscalSshClient.cs b/Core/Remote/PiscalSshClient.cs index e6b6bbe..4ce2af4 100644 --- a/Core/Remote/PiscalSshClient.cs +++ b/Core/Remote/PiscalSshClient.cs @@ -41,7 +41,11 @@ namespace LeafWeb.Core.Remote var conn = new DbConnectionStringBuilder {ConnectionString = connectionString}; _host = conn["host"] as string; - _port = int.Parse(conn["port"] as string ?? "22"); // default 22 + // TODO: fix this, exception when port is not present + if (conn.ContainsKey("port")) + _port = int.Parse(conn["port"] as string ?? "22"); // default 22 + else + _port = 22; var username = conn["username"] as string; var password = conn["password"] as string; _connectionInfo = new PasswordConnectionInfo(_host, _port, username, password);