mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 21:36:17 +00:00
just tried to revert to it being pastable textfields but nope it doesnt work
its bc its not base64 encoded maybe try that after?
This commit is contained in:
@@ -47,7 +47,7 @@ struct blankHost: HostPr {
|
||||
|
||||
struct debugHost: HostPr {
|
||||
var address: String = "localhost"
|
||||
var port: Int = 32222
|
||||
var port: Int = 22
|
||||
var username: String = "default"
|
||||
var password: String = ""
|
||||
var key: Data? = nil
|
||||
|
||||
@@ -169,7 +169,7 @@ class SSHHandler: ObservableObject {
|
||||
return
|
||||
}
|
||||
|
||||
func authWithPubkey(pub: Data, priv: Data, pass: String) {
|
||||
func authWithPubkey(pub: String, priv: String, pass: String) {
|
||||
guard session != nil else {
|
||||
withAnimation { authorized = false }
|
||||
return
|
||||
@@ -184,8 +184,8 @@ class SSHHandler: ObservableObject {
|
||||
fileManager.createFile(atPath: tempPubkey.path(), contents: nil)
|
||||
fileManager.createFile(atPath: tempKey.path(), contents: nil)
|
||||
|
||||
try? pub.write(to: tempPubkey)
|
||||
try? priv.write(to: tempKey)
|
||||
try? Data(base64Encoded: pub)?.write(to: tempPubkey)
|
||||
try? Data(base64Encoded: priv)?.write(to: tempKey)
|
||||
|
||||
var pubkey: ssh_key?
|
||||
ssh_pki_import_pubkey_file(tempPubkey.path(), &pubkey)
|
||||
|
||||
Reference in New Issue
Block a user