{"id":22833021,"url":"https://github.com/frugghi/swiftsh","last_synced_at":"2025-04-09T12:05:28.674Z","repository":{"id":34722059,"uuid":"38699558","full_name":"Frugghi/SwiftSH","owner":"Frugghi","description":"A Swift SSH framework that wraps libssh2.","archived":false,"fork":false,"pushed_at":"2021-11-11T03:10:00.000Z","size":22188,"stargazers_count":198,"open_issues_count":30,"forks_count":76,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-02T10:13:04.774Z","etag":null,"topics":["ios","libssh2","ssh","swift","swift-framework"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Frugghi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-07T16:14:05.000Z","updated_at":"2025-02-24T17:41:34.000Z","dependencies_parsed_at":"2022-07-16T23:31:11.199Z","dependency_job_id":null,"html_url":"https://github.com/Frugghi/SwiftSH","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Frugghi%2FSwiftSH","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Frugghi%2FSwiftSH/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Frugghi%2FSwiftSH/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Frugghi%2FSwiftSH/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Frugghi","download_url":"https://codeload.github.com/Frugghi/SwiftSH/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248036063,"owners_count":21037092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ios","libssh2","ssh","swift","swift-framework"],"created_at":"2024-12-12T21:11:27.642Z","updated_at":"2025-04-09T12:05:28.655Z","avatar_url":"https://github.com/Frugghi.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SwiftSH\n[![Build Status](https://travis-ci.org/Frugghi/SwiftSH.svg?branch=master)](https://travis-ci.org/Frugghi/SwiftSH)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![Pods](https://img.shields.io/cocoapods/v/SwiftSH.svg)](https://cocoapods.org/pods/SwiftSH)\n[![Pod platforms](https://img.shields.io/cocoapods/p/SwiftSH.svg)](https://cocoapods.org/pods/SwiftSH)\n\nA Swift SSH framework that wraps [libssh2](https://www.libssh2.org/).\n\n**Features:**\n- [x] Thread-safety\n- [x] SSH shell\n- [x] SSH command\n- [ ] SCP\n- [ ] SFTP\n- [ ] Tests\n- [ ] Documentation\n\n## :package: Installation\n\n### CocoaPods\n[CocoaPods](https://cocoapods.org) is the dependency manager for Swift and Objective-C Cocoa projects. It has over ten thousand libraries and can help you scale your projects elegantly.\n\nAdd this to your *Podfile*:\n```Ruby\nuse_frameworks!\n\npod 'SwiftSH'\n```\n\n### Carthage\n[Carthage](https://github.com/Carthage/Carthage) builds your dependencies and provides you with binary frameworks, but you retain full control over your project structure and setup.\n\nAdd this to your *Cartfile*:\n```Ruby\ngithub \"Frugghi/SwiftSH\"\n```\n\n## :book: Documentation\nThe API documentation is available [here](https://frugghi.github.io/SwiftSH/).\n\n## :computer: Usage\nImport the framework:\n```Swift\nimport SwiftSH\n```\n\nExecute a SSH command:\n```Swift\nlet command = Command(host: \"localhost\", port: 22)\n// ...\ncommand.connect()\n       .authenticate(.byPassword(username: \"username\", password: \"password\"))\n       .execute(command) { (command, result: String?, error) in\n           if let result = result {\n               print(\"\\(result)\")\n           } else {\n               print(\"ERROR: \\(error)\")\n           }\n       }\n```\n\nOpen a SSH shell:\n```Swift\nlet shell = Shell(host: \"localhost\", port: 22)\n// ...\nshell.withCallback { (string: String?, error: String?) in\n         print(\"\\(string ?? error!)\")\n     }\n     .connect()\n     .authenticate(.byPassword(username: \"username\", password: \"password\"))\n     .open { (error) in\n         if let error = error {\n             print(\"\\(error)\")\n         }\n     }\n// ...\nshell.write(\"ls -lA\") { (error) in\n    if let error = error {\n        print(\"\\(error)\")\n    }\n}\n// ...\nshell.disconnect()\n```\n\n## :warning: OpenSSL and Libssh2 binaries\n*SwiftSH* includes precompiled binaries of Libssh2 and OpenSSL generated with [this script](https://github.com/Frugghi/iSSH2). For security reasons, you are strongly encouraged to recompile the libraries and replace the binaries.\n\n## :page_facing_up: License [![LICENSE](https://img.shields.io/cocoapods/l/SwiftSH.svg)](https://raw.githubusercontent.com/Frugghi/SwiftSH/master/LICENSE)\n*SwiftSH* is released under the MIT license. See [LICENSE](https://raw.githubusercontent.com/Frugghi/SwiftSH/master/LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrugghi%2Fswiftsh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrugghi%2Fswiftsh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrugghi%2Fswiftsh/lists"}