ios - NMSSH does not connect with SWIFT -
i tried use nmssh first time not connect me
import uikit import nmssh class viewcontroller: uiviewcontroller { override func viewdidload() { super.viewdidload() // additional setup after loading view, typically nib. let session = nmsshsession(host: "11.111.11.11", andusername: "vnc") if session.connected == true{ session.authenticatebypassword("1234") if session.authorized == true { print("works") } } } }
did forget session.connect()
start connection
let session = nmsshsession(host: "11.111.11.11", andusername: "inc") session.connect() if session.connected == true{ session.authenticatebypassword("1234") if session.authorized == true { print("works") } }
Comments
Post a Comment