Documentation
Language: Swift
Documentation
SSHAgent
Core Types
C
SSHAgent
Instance Methods
M
func createNIOSSHPrivateKey(for: SSHAgentKey) async throws -> NIOSSHPrivateKey
M
func disconnect() async
M
func findKey(for: [String]) async -> SSHAgentKey?
M
func requestIdentities() async -> [SSHAgentKey]
M
func requestSignature<DataBytes>(for: DataBytes, usingKey: SSHAgentKey, flags: SSHAgentSignFlags) async throws -> Data
M
func setDebug(Bool)
Type Properties
P
static let shared: SSHAgent
Default Implementations
Actor Implementations
Instance Methods
M
func assertIsolated(@autoclosure () -> String, file: StaticString, line: UInt)
M
func assumeIsolated<T>((isolated Self) throws -> T, file: StaticString, line: UInt) rethrows -> T
M
func preconditionIsolated(@autoclosure () -> String, file: StaticString, line: UInt)
S
SSHAgentKey
Initializers
M
init(keyBlob: Data, comment: String, debug: Bool) throws
Instance Properties
P
let comment: String
P
let keyBlob: Data
P
let publicKey: NIOSSHPublicKey
E
SSHAgentError
Enumeration Cases
E
case agentNotAvailable(String)
E
case communicationFailure(String)
E
case invalidKeyData(String)
E
case keyParsingFailed(String)
E
case signingFailed(String)
Default Implementations
Error Implementations
Instance Properties
P
var localizedDescription: String
E
SSHAgentMessageType
Enumeration Cases
E
case failure
E
case identitiesAnswer
E
case requestIdentities
E
case signRequest
E
case signResponse
E
case success
Initializers
M
init?(rawValue: UInt8)
Default Implementations
Equatable Implementations
Operators
static func != (Self, Self) -> Bool
RawRepresentable Implementations
Instance Properties
P
var hashValue: Int
Instance Methods
M
func hash(into: inout Hasher)
S
SSHAgentSignFlags
Initializers
M
init(rawValue: UInt32)
Instance Properties
P
let rawValue: UInt32
Type Properties
P
static let rsaSha2_256: SSHAgentSignFlags
P
static let rsaSha2_512: SSHAgentSignFlags
Default Implementations
Equatable Implementations
Operators
static func != (Self, Self) -> Bool
OptionSet Implementations
Initializers
M
init()
Instance Methods
M
func contains(Self) -> Bool
M
func formIntersection(Self)
M
func formSymmetricDifference(Self)
M
func formUnion(Self)
M
func insert(Self.Element) -> (inserted: Bool, memberAfterInsert: Self.Element)
M
func intersection(Self) -> Self
M
func remove(Self.Element) -> Self.Element?
M
func symmetricDifference(Self) -> Self
M
func union(Self) -> Self
M
func update(with: Self.Element) -> Self.Element?
SetAlgebra Implementations
Initializers
M
init<S>(S)
M
init(arrayLiteral: Self.Element...)
Instance Properties
P
var isEmpty: Bool
Instance Methods
M
func isDisjoint(with: Self) -> Bool
M
func isStrictSubset(of: Self) -> Bool
M
func isStrictSuperset(of: Self) -> Bool
M
func isSubset(of: Self) -> Bool
M
func isSuperset(of: Self) -> Bool
M
func subtract(Self)
M
func subtracting(Self) -> Self
T
SendableData
Signing Support
M
func createNIOSSHPrivateKey(for: SSHAgentKey) async throws -> NIOSSHPrivateKey
M
func requestSignature<DataBytes>(for: DataBytes, usingKey: SSHAgentKey, flags: SSHAgentSignFlags) async throws -> Data
C
SSHAgentPrivateKey
Initializers
M
init(agentKey: SSHAgentKey, agent: SSHAgent)
Instance Properties
P
var publicKey: NIOSSHPublicKey
Instance Methods
M
func sign<DataBytes>(DataBytes) async throws -> Data
Protocol Handling
M
func requestIdentities() async -> [SSHAgentKey]
Agent Protocol Notes
Relevant Symbols
M
func requestIdentities() async -> [SSHAgentKey]
M
func requestSignature<DataBytes>(for: DataBytes, usingKey: SSHAgentKey, flags: SSHAgentSignFlags) async throws -> Data
SSHClient
Essentials
C
SSHClient
Initializers
M
init(configuration: SSHClientConfiguration, eventLoopGroup: EventLoopGroup?)
Instance Properties
P
var isConnected: Bool
Instance Methods
M
func connect() async throws
M
func disconnect() async throws
M
func executeCommand(String) async throws -> CommandResult
M
func startInteractiveShell(term: String, terminalCharacterWidth: Int, terminalRowHeight: Int, terminalPixelWidth: Int, terminalPixelHeight: Int, terminalModes: SSHTerminalModes) async throws -> Int
M
func startPortForwarding(PortForwardingConfiguration) async throws -> PortForwardingServer
Default Implementations
Actor Implementations
Instance Methods
M
func assertIsolated(@autoclosure () -> String, file: StaticString, line: UInt)
M
func assumeIsolated<T>((isolated Self) throws -> T, file: StaticString, line: UInt) rethrows -> T
M
func preconditionIsolated(@autoclosure () -> String, file: StaticString, line: UInt)
S
SSHClientConfiguration
Initializers
M
init(host: String, port: Int, username: String, password: String?, debug: Bool)
Instance Properties
P
let debug: Bool
P
let host: String
P
let password: String?
P
let port: Int
P
let username: String
Type Methods
M
static func parseDestination(String, defaultUsername: String?) -> (host: String, port: Int, username: String)
S
CommandResult
Initializers
M
init(exitStatus: Int, output: Data, errorOutput: Data)
Instance Properties
P
let errorOutput: Data
P
let exitStatus: Int
P
let output: Data
E
SSHClientError
Enumeration Cases
E
case commandExecFailed
E
case connectionNotEstablished
E
case invalidChannelType
E
case invalidData
E
case passwordAuthenticationNotSupported
E
case publicKeyAuthenticationNotSupported
Default Implementations
Equatable Implementations
Operators
static func != (Self, Self) -> Bool
Error Implementations
Instance Properties
P
var localizedDescription: String
Interactive and Non-Interactive Sessions
M
func connect() async throws
M
func executeCommand(String) async throws -> CommandResult
M
func startInteractiveShell(term: String, terminalCharacterWidth: Int, terminalRowHeight: Int, terminalPixelWidth: Int, terminalPixelHeight: Int, terminalModes: SSHTerminalModes) async throws -> Int
Running Sessions
Session APIs
M
func executeCommand(String) async throws -> CommandResult
M
func startInteractiveShell(term: String, terminalCharacterWidth: Int, terminalRowHeight: Int, terminalPixelWidth: Int, terminalPixelHeight: Int, terminalModes: SSHTerminalModes) async throws -> Int
Port Forwarding
S
PortForwardingConfiguration
Initializers
M
init(bindHost: String, bindPort: Int, targetHost: String, targetPort: Int)
Instance Properties
P
let bindHost: String
P
let bindPort: Int
P
let targetHost: String
P
let targetPort: Int
Type Methods
M
static func parseListen(String) -> PortForwardingConfiguration?
C
PortForwardingServer
Initializers
M
init(group: EventLoopGroup, bindHost: Substring, bindPort: Int, (Channel) -> EventLoopFuture<Void>)
Instance Methods
M
func close() -> EventLoopFuture<Void>
M
func run() -> EventLoopFuture<Void>
M
func start() -> EventLoopFuture<Void>
M
func startPortForwarding(PortForwardingConfiguration) async throws -> PortForwardingServer
Forwarding Traffic
Forwarding Types
S
PortForwardingConfiguration
Initializers
M
init(bindHost: String, bindPort: Int, targetHost: String, targetPort: Int)
Instance Properties
P
let bindHost: String
P
let bindPort: Int
P
let targetHost: String
P
let targetPort: Int
Type Methods
M
static func parseListen(String) -> PortForwardingConfiguration?
C
PortForwardingServer
Initializers
M
init(group: EventLoopGroup, bindHost: Substring, bindPort: Int, (Channel) -> EventLoopFuture<Void>)
Instance Methods
M
func close() -> EventLoopFuture<Void>
M
func run() -> EventLoopFuture<Void>
M
func start() -> EventLoopFuture<Void>
C
SSHWrapperHandler
Initializers
M
init()
Instance Methods
M
func channelRead(context: ChannelHandlerContext, data: NIOAny)
M
func write(context: ChannelHandlerContext, data: NIOAny, promise: EventLoopPromise<Void>?)
Type Aliases
T
SSHWrapperHandler.InboundIn
T
SSHWrapperHandler.InboundOut
T
SSHWrapperHandler.OutboundIn
T
SSHWrapperHandler.OutboundOut
Default Implementations
ChannelHandler Implementations
Instance Methods
M
func handlerAdded(context: ChannelHandlerContext)
M
func handlerRemoved(context: ChannelHandlerContext)
ChannelInboundHandler Implementations
Instance Methods
M
func unwrapInboundIn(NIOAny) -> Self.InboundIn
M
func wrapInboundOut(Self.InboundOut) -> NIOAny
ChannelOutboundHandler Implementations
Instance Methods
M
func unwrapOutboundIn(NIOAny) -> Self.OutboundIn
C
GlueHandler
Instance Methods
M
func channelInactive(context: ChannelHandlerContext)
M
func channelRead(context: ChannelHandlerContext, data: NIOAny)
M
func channelReadComplete(context: ChannelHandlerContext)
M
func channelWritabilityChanged(context: ChannelHandlerContext)
M
func errorCaught(context: ChannelHandlerContext, error: Error)
M
func read(context: ChannelHandlerContext)
M
func userInboundEventTriggered(context: ChannelHandlerContext, event: Any)
Type Aliases
T
GlueHandler.OutboundOut
Type Methods
M
static func matchedPair() -> (GlueHandler, GlueHandler)
Default Implementations
ChannelHandler Implementations
Instance Methods
M
func handlerAdded(context: ChannelHandlerContext)
M
func handlerRemoved(context: ChannelHandlerContext)
ChannelInboundHandler Implementations
Instance Methods
M
func unwrapInboundIn(NIOAny) -> Self.InboundIn
M
func wrapInboundOut(Self.InboundOut) -> NIOAny
Type Aliases
T
GlueHandler.InboundIn
ChannelOutboundHandler Implementations
Instance Methods
M
func unwrapOutboundIn(NIOAny) -> Self.OutboundIn
Type Aliases
T
GlueHandler.OutboundIn
Authentication and Internals
Authentication Flow
C
SSHWrapperHandler
Initializers
M
init()
Instance Methods
M
func channelRead(context: ChannelHandlerContext, data: NIOAny)
M
func write(context: ChannelHandlerContext, data: NIOAny, promise: EventLoopPromise<Void>?)
Type Aliases
T
SSHWrapperHandler.InboundIn
T
SSHWrapperHandler.InboundOut
T
SSHWrapperHandler.OutboundIn
T
SSHWrapperHandler.OutboundOut
Default Implementations
ChannelHandler Implementations
Instance Methods
M
func handlerAdded(context: ChannelHandlerContext)
M
func handlerRemoved(context: ChannelHandlerContext)
ChannelInboundHandler Implementations
Instance Methods
M
func unwrapInboundIn(NIOAny) -> Self.InboundIn
M
func wrapInboundOut(Self.InboundOut) -> NIOAny
ChannelOutboundHandler Implementations
Instance Methods
M
func unwrapOutboundIn(NIOAny) -> Self.OutboundIn
C
GlueHandler
Instance Methods
M
func channelInactive(context: ChannelHandlerContext)
M
func channelRead(context: ChannelHandlerContext, data: NIOAny)
M
func channelReadComplete(context: ChannelHandlerContext)
M
func channelWritabilityChanged(context: ChannelHandlerContext)
M
func errorCaught(context: ChannelHandlerContext, error: Error)
M
func read(context: ChannelHandlerContext)
M
func userInboundEventTriggered(context: ChannelHandlerContext, event: Any)
Type Aliases
T
GlueHandler.OutboundOut
Type Methods
M
static func matchedPair() -> (GlueHandler, GlueHandler)
Default Implementations
ChannelHandler Implementations
Instance Methods
M
func handlerAdded(context: ChannelHandlerContext)
M
func handlerRemoved(context: ChannelHandlerContext)
ChannelInboundHandler Implementations
Instance Methods
M
func unwrapInboundIn(NIOAny) -> Self.InboundIn
M
func wrapInboundOut(Self.InboundOut) -> NIOAny
Type Aliases
T
GlueHandler.InboundIn
ChannelOutboundHandler Implementations
Instance Methods
M
func unwrapOutboundIn(NIOAny) -> Self.OutboundIn
Type Aliases
T
GlueHandler.OutboundIn
ssh-client
Command Interface
Using the Command-Line Tool
/
SSHClient
/
SSHClientError
Framework
Error Implementations
Topics
Instance Properties
V
localizedDescription