SSHSession
open class SSHSession<T> where T : RawLibrary
Undocumented
-
The server host to connect to.
Declaration
Swift
public let host: String -
The server port to connect to.
Declaration
Swift
public let port: UInt16 -
The logger.
Declaration
Swift
public var log: Logger -
The version of the underlying SSH library.
Declaration
Swift
public var version: String? { get } -
Undocumented
Declaration
Swift
public init?(host: String, port: UInt16 = 22)
-
The banner that will be sent to the remote host when the SSH session is started.
If
nil, the default banner of the SSH library will be used.Declaration
Swift
public var banner: String? -
A boolean value indicating whether the session connected successfully.
Declaration
Swift
public fileprivate(set) var connected: Bool -
The banner received from the remote host.
Declaration
Swift
public fileprivate(set) var remoteBanner: String? -
The fingerprint received from the remote host.
Declaration
Swift
public fileprivate(set) var fingerprint: [FingerprintHashType : String] -
The timeout for the internal SSH operations.
Declaration
Swift
public var timeout: TimeInterval { get set } -
Undocumented
Declaration
Swift
public func connect() -> Self -
Undocumented
Declaration
Swift
public func connect(_ completion: SSHCompletionBlock?) -
Undocumented
Declaration
Swift
public func disconnect(_ completion: (() -> ())?)
-
A boolean value indicating whether the session has been successfully authenticated.
Declaration
Swift
public var authenticated: Bool { get } -
Undocumented
Declaration
Swift
public func supportedAuthenticationMethods(_ username: String) throws -> [AuthenticationMethod] -
Undocumented
Declaration
Swift
public func authenticate(_ challenge: AuthenticationChallenge?) -> Self -
Undocumented
Declaration
Swift
public func authenticate(_ challenge: AuthenticationChallenge?, completion: SSHCompletionBlock?) -
Undocumented
Declaration
Swift
public func checkFingerprint(_ callback: @escaping ([FingerprintHashType: String]) -> Bool) -> Self -
Undocumented
Declaration
Swift
public func checkFingerprint(_ validFingerprints: String...) -> Self
View on GitHub
SSHSession Class Reference