From 2207c5d924e86710052e4ce00d9c7092a58be0f7 Mon Sep 17 00:00:00 2001 From: neon443 <69979447+neon443@users.noreply.github.com> Date: Wed, 25 Jun 2025 14:12:41 +0100 Subject: [PATCH] upon accepting the new hostkey, you connect --- ShhShell/SSH/SSHHandler.swift | 2 +- ShhShell/Views/ConnectionView.swift | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ShhShell/SSH/SSHHandler.swift b/ShhShell/SSH/SSHHandler.swift index 9a9c30a..3f2cfc7 100644 --- a/ShhShell/SSH/SSHHandler.swift +++ b/ShhShell/SSH/SSHHandler.swift @@ -55,8 +55,8 @@ class SSHHandler: @unchecked Sendable, ObservableObject { try connect() } catch { print("error in connect \(error.localizedDescription)") + return } - guard connected else { return } try? authWithNone() getAuthMethods() diff --git a/ShhShell/Views/ConnectionView.swift b/ShhShell/Views/ConnectionView.swift index d464fb6..db2c0be 100644 --- a/ShhShell/Views/ConnectionView.swift +++ b/ShhShell/Views/ConnectionView.swift @@ -108,6 +108,7 @@ struct ConnectionView: View { .alert("Hostkey changed", isPresented: $hostKeyChangedAlert) { Button("Accept New Hostkey", role: .destructive) { hostsManager.updateHost(handler.host) + handler.go() } Button("Disconnect", role: .cancel) {