<commit_before># NMSSH

This is a complete rewrite of the previous NMSSH library. The goal is to
create a clean, easy-to-use, test driven Cocoa framework that wraps libssh2.

NMSSH was initially built for usage in [Kleio](http://9muses.se/kleio) - a Mac OSX application that simplifies continuous deployment.

**Using libssh2 version:** `1.4.2`

Are you using NMSSH for something cool? Let me know.

## Usage

### Install the framework

* Build the framework and add it to your project
* Add `#include <NMSSH/NMSSH.h>` to your source file.

### Connect to a server (not yet implemented)

#### 1. Create a new session

    NMSSHSession *session = [NMSSHSession connectToHost:@"127.0.0.1:22"
                                           withUsername:@"user"];

    if ([session isConnected]) {
        NSLog(@"Successfully created a new session");
    }

#### 2.1. Authenticate by password

    [session authenticateByPassword:@"<PASSWORD>"];

#### 2.2. Or by public key

    // Explicitly set the public key that should be used...
    // Pass nil as password parameter for unprotected keys
    [session authenticateByPublicKey:@"~/.ssh/id_rsa.pub"<commit_msg>Add contact link to README<commit_after># NMSSH

This is a complete rewrite of the previous NMSSH library. The goal is to
create a clean, easy-to-use, test driven Cocoa framework that wraps libssh2.

NMSSH was initially built for usage in [Kleio](http://9muses.se/kleio) - a Mac OSX application that simplifies continuous deployment.

**Using libssh2 version:** `1.4.2`

Are you using NMSSH for something cool? [Let me know](http://twitter.com/Lejdborg).

## Usage

### Install the framework

* Build the framework and add it to your project
* Add `#include <NMSSH/NMSSH.h>` to your source file.

### Connect to a server (not yet implemented)

#### 1. Create a new session

    NMSSHSession *session = [NMSSHSession connectToHost:@"127.0.0.1:22"
                                           withUsername:@"user"];

    if ([session isConnected]) {
        NSLog(@"Successfully created a new session");
    }

#### 2.1. Authenticate by password

    [session authenticateByPassword:@"<PASSWORD>"];

#### 2.2. Or by public key

    // Explicitly set the public key that should be used...
    // Pass nil as password parameter for unprotected keys
    [session authenticateByPublicKey:@"~/.ssh/id_rsa.pub"
{'fraction_non_alphanumeric': 0.10908319185059423, 'fraction_numerical': 0.016129032258064516, 'mean_word_length': 3.2315978456014363, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3446991', 'n_tokens_mistral': 752, 'n_tokens_neox': 685, 'n_words': 267}