All Projects → Frugghi → Swiftsh

Frugghi / Swiftsh

Licence: mit
A Swift SSH framework that wraps libssh2.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Swiftsh

Question And Answer Sharing System
本系统是基于微信小程序的问答分享系统,采用微信小程序的形式进行开发,后端采用Java框架开发,用户可以在小程序中进行提问、回答、分享故事、评论、围观以及充值收益等操作,在围观的过程中,用户对于感兴趣的内容可进行打赏与点赞。 对于本系统中的提问与分享,提供免费与付费两种模式,将知识交互的便捷性和信息娱乐的共享性进行结合。
Stars: ✭ 135 (-8.78%)
Mutual labels:  ssh
Coco
Jumpserver ssh/ws server
Stars: ✭ 139 (-6.08%)
Mutual labels:  ssh
Wordmove
Multi-stage command line deploy/mirroring and task runner for Wordpress
Stars: ✭ 1,791 (+1110.14%)
Mutual labels:  ssh
Mastodonkit
MastodonKit is a Swift Framework that wraps Mastodon's API
Stars: ✭ 134 (-9.46%)
Mutual labels:  swift-framework
Cli
🧰 A zero trust swiss army knife for working with X509, OAuth, JWT, OATH OTP, etc.
Stars: ✭ 2,151 (+1353.38%)
Mutual labels:  ssh
Ssm Sh
Experiment to use SSM RunCommand instead of SSH
Stars: ✭ 140 (-5.41%)
Mutual labels:  ssh
Contentful.swift
A delightful Swift interface to Contentful's content delivery API.
Stars: ✭ 132 (-10.81%)
Mutual labels:  swift-framework
Swiftywebrtc
Swift Framework for WebRTC
Stars: ✭ 147 (-0.68%)
Mutual labels:  swift-framework
Alispot
自动创建阿里云抢占式实例,并启用网络加速
Stars: ✭ 139 (-6.08%)
Mutual labels:  ssh
Docker X11 Bridge
Simple Xpra X11 bridge to enable GUI with any docker image
Stars: ✭ 143 (-3.38%)
Mutual labels:  ssh
Generate Ssh Configs
Automatically generate ssh config files for your cloud servers
Stars: ✭ 136 (-8.11%)
Mutual labels:  ssh
Laravel Ssh Tunnel
Easy creation & maintenance of an SSH Tunnel for Laravel/Lumen
Stars: ✭ 134 (-9.46%)
Mutual labels:  ssh
Gossh
gossh is an extremely concise ssh tool which developed by go language. It has only a binary program without any dependencies and is really ready to use out of the box. gossh is used Used to manage of linux (like unix) machines: including remote execution of commands and push and pull files, and support stand-alone and batch modes.
Stars: ✭ 142 (-4.05%)
Mutual labels:  ssh
Adams
UNIX system administration in Common Lisp
Stars: ✭ 135 (-8.78%)
Mutual labels:  ssh
Chef Ssh Hardening
This chef cookbook provides secure ssh-client and ssh-server configurations.
Stars: ✭ 144 (-2.7%)
Mutual labels:  ssh
Pinlayout
Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainable. [iOS/macOS/tvOS/CALayer]
Stars: ✭ 1,870 (+1163.51%)
Mutual labels:  swift-framework
Dos ssh
Use BIOS ram hacks to make a SSH server out of any INT 10 13h app (MS-DOS is one of those)
Stars: ✭ 139 (-6.08%)
Mutual labels:  ssh
Cedarkey
$2 hardware SSH keys storage
Stars: ✭ 148 (+0%)
Mutual labels:  ssh
Bookstore Ios
 Sample iOS App - A collection of examples and patterns for Unit Testing, UI Testing, handling Result/Optionals, writing documentation, and more. Details in README.
Stars: ✭ 147 (-0.68%)
Mutual labels:  swift-framework
Wolfssh
wolfSSH is a small, fast, portable SSH implementation, including support for SCP and SFTP.
Stars: ✭ 142 (-4.05%)
Mutual labels:  ssh

SwiftSH

Build Status Carthage compatible Pods Pod platforms

A Swift SSH framework that wraps libssh2.

Features:

  • [x] Thread-safety
  • [x] SSH shell
  • [x] SSH command
  • [ ] SCP
  • [ ] SFTP
  • [ ] Tests
  • [ ] Documentation

📦 Installation

CocoaPods

CocoaPods 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.

Add this to your Podfile:

use_frameworks!

pod 'SwiftSH'

Carthage

Carthage builds your dependencies and provides you with binary frameworks, but you retain full control over your project structure and setup.

Add this to your Cartfile:

github "Frugghi/SwiftSH"

📖 Documentation

The API documentation is available here.

💻 Usage

Import the framework:

import SwiftSH

Execute a SSH command:

let command = Command(host: "localhost", port: 22)
// ...
command.connect()
       .authenticate(.byPassword(username: "username", password: "password"))
       .execute(command) { (command, result: String?, error) in
           if let result = result {
               print("\(result)")
           } else {
               print("ERROR: \(error)")
           }
       }

Open a SSH shell:

let shell = Shell(host: "localhost", port: 22)
// ...
shell.withCallback { (string: String?, error: String?) in
         print("\(string ?? error!)")
     }
     .connect()
     .authenticate(.byPassword(username: "username", password: "password"))
     .open { (error) in
         if let error = error {
             print("\(error)")
         }
     }
// ...
shell.write("ls -lA") { (error) in
    if let error = error {
        print("\(error)")
    }
}
// ...
shell.disconnect()

⚠️ OpenSSL and Libssh2 binaries

SwiftSH includes precompiled binaries of Libssh2 and OpenSSL generated with this script. For security reasons, you are strongly encouraged to recompile the libraries and replace the binaries.

📄 License LICENSE

SwiftSH is released under the MIT license. See LICENSE for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].