/// <exception cref="NSch.JSchException"></exception> public virtual Session GetSession(string username, string host, int port) { if (username == null) { throw new JSchException("username must not be null."); } if (host == null) { throw new JSchException("host must not be null."); } Session s = new Session(this); s.SetUserName(username); s.SetHost(host); s.SetPort(port); return s; }