mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 13:26:16 +00:00
upon accepting the new hostkey, you connect
This commit is contained in:
@@ -55,8 +55,8 @@ class SSHHandler: @unchecked Sendable, ObservableObject {
|
|||||||
try connect()
|
try connect()
|
||||||
} catch {
|
} catch {
|
||||||
print("error in connect \(error.localizedDescription)")
|
print("error in connect \(error.localizedDescription)")
|
||||||
|
return
|
||||||
}
|
}
|
||||||
guard connected else { return }
|
|
||||||
|
|
||||||
try? authWithNone()
|
try? authWithNone()
|
||||||
getAuthMethods()
|
getAuthMethods()
|
||||||
|
|||||||
@@ -108,6 +108,7 @@ struct ConnectionView: View {
|
|||||||
.alert("Hostkey changed", isPresented: $hostKeyChangedAlert) {
|
.alert("Hostkey changed", isPresented: $hostKeyChangedAlert) {
|
||||||
Button("Accept New Hostkey", role: .destructive) {
|
Button("Accept New Hostkey", role: .destructive) {
|
||||||
hostsManager.updateHost(handler.host)
|
hostsManager.updateHost(handler.host)
|
||||||
|
handler.go()
|
||||||
}
|
}
|
||||||
|
|
||||||
Button("Disconnect", role: .cancel) {
|
Button("Disconnect", role: .cancel) {
|
||||||
|
|||||||
Reference in New Issue
Block a user