2/14/2023 0 Comments Xojo instr![]() ![]() ![]() Print "Authentication methods: "+ userauthlist * check what authentication methods are available */ dim userauthlist as string = session.UserAuthList(username)ĭim authPassword as Boolean = false dim authKeyboardInteractive as Boolean = false dim authPublickey as Boolean = false Print "Fingerprint: "+EncodeHex(fingerprint) The first thing to do is check //* the hostkey's fingerprint against our known hosts Your app may have it //* hard coded, may go to a file, may present it to the user, that's your //* call dim fingerprint as string = session.HostKeyHash(session.kHostKeyHashSHA1) Print "Failure establishing SSH session" Return 9 end if //* At this point we havn't authenticated. Print "Failed to connect socket!" Return 1 end if This will trade welcome //* banners, exchange keys, and setup crypto, compression, and MAC layers dim session as new MySSH2SessionMBS(hostAddr, 22) * Create a session instance and start it up. EventHandler Function Run(args() as String) As Integer const Address = "1.2.3.4" const username = "xxx" const password = "xxx" const keyfile1 = "" const keyfile2 = "" dim hostAddr as string = (Address)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |