diff --git a/ShhShell/SSH/SSHHandler.swift b/ShhShell/SSH/SSHHandler.swift index d1fdcb5..25a6cc3 100644 --- a/ShhShell/SSH/SSHHandler.swift +++ b/ShhShell/SSH/SSHHandler.swift @@ -307,6 +307,21 @@ class SSHHandler: @unchecked Sendable, ObservableObject { return } + //MARK: very wip +// func authWithKbint() { +// withAnimation { state = .authorizingKbint } +// +// let status = ssh_userauth_kbdint(session, nil, nil) +// if status == SSH_AUTH_INFO.rawValue { +// print(ssh_userauth_kbdint_getnprompts(session)) +// print(ssh_userauth_kbdint_getname(session)) +// print(ssh_userauth_kbdint_getinstruction(session)) +// print(ssh_userauth_kbdint_getprompt(session, <#T##i: UInt32##UInt32#>, <#T##echo: UnsafeMutablePointer!##UnsafeMutablePointer!#>)) +// } +// +//// for prompt in +// } + func getAuthMethods() -> [AuthType] { var result: [AuthType] = [] let recievedMethod = UInt32(ssh_userauth_list(session, nil)) diff --git a/ShhShell/SSH/SSHState.swift b/ShhShell/SSH/SSHState.swift index 3933348..aeac9e2 100644 --- a/ShhShell/SSH/SSHState.swift +++ b/ShhShell/SSH/SSHState.swift @@ -12,6 +12,7 @@ enum SSHState { case idle case connecting case authorizing + case authorizingKbint case authorized case shellOpen @@ -23,7 +24,7 @@ enum SSHState { case .idle: return .gray - case .connecting, .authorizing: + case .connecting, .authorizing, .authorizingKbint: return .orange case .authorized, .shellOpen: