From 734d4ab5ed68c2149b5de93dd2c296d59ba407e7 Mon Sep 17 00:00:00 2001 From: ansgarz <ansgar.zwick@meissa.de> Date: Mon, 6 Jan 2025 17:43:38 +0100 Subject: [PATCH] improve ssh connection error msg --- .../provs/framework/core/processors/RemoteUbuntuProcessor.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/core/processors/RemoteUbuntuProcessor.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/core/processors/RemoteUbuntuProcessor.kt index 4697e4a..ec1e1ce 100644 --- a/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/core/processors/RemoteUbuntuProcessor.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/core/processors/RemoteUbuntuProcessor.kt @@ -55,7 +55,7 @@ class RemoteProcessor(val host: InetAddress, val user: String, val password: Sec try { ssh.disconnect() } finally { - val errorMag = "Error when initializing ssh (Host, username, password or ssh-key might be wrong) " + val errorMag = "Error when initializing ssh (ensure openssh-server is running and that host, username, password and ssh-key are correct) " log.error(errorMag + e.message) throw RuntimeException(errorMag, e) } @@ -126,7 +126,7 @@ class RemoteProcessor(val host: InetAddress, val user: String, val password: Sec try { log.info("Disconnecting ssh.") ssh.disconnect() - } catch (e: IOException) { + } catch (_: IOException) { // No prov required } }