SCP

Single-file SCP upload and download. Helpers are a public extension SSHConnection on the Swift side — there is no separate SCPClient type. Swift-only; not exposed from SSHKitObjC.

Upload

try await connection.uploadFileWithSCP(
    localURL: URL(fileURLWithPath: "/Users/me/release.zip"),
    toRemotePath: "/srv/release.zip",
    permissions: 0o644,
    maximumSize: 64 * 1024 * 1024
)

Download

try await connection.downloadFileWithSCP(
    remotePath: "/srv/release.zip",
    toLocalURL: URL(fileURLWithPath: "/Users/me/release.zip"),
    maximumSize: 64 * 1024 * 1024
)

Limits