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

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -