Skip to content

Commit

Permalink
Write the tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
honzasp committed Feb 9, 2023
1 parent 46c972f commit 92754ba
Show file tree
Hide file tree
Showing 32 changed files with 2,213 additions and 11 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true

[*.rs]
indent_style = space
indent_size = 4

# disable line wrapping in Markdown files
[docs/**.md]
max_line_length = 0
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Makiko changelog

## 0.2.1

- Deprecate `Pubkey::algos_secure()` and `Pubkey::algos_compatible_less_secure()`, replace with
`Pubkey::algos()`

## 0.2.0

The first generally usable version.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ readme = "README.md"

keywords = ["ssh", "ssh-client", "tokio", "async"]
categories = ["network-programming", "asynchronous"]
description = "Asynchronous SSH client library"
description = "Asynchronous SSH client library in pure Rust"

[[test]]
name = "compat"
Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Makiko

Makiko is an asynchronous SSH client library for Rust.
Makiko is an asynchronous SSH client library in pure Rust.

**[Github][github] | [API docs][docs-rs] | [Crate][crates-io]**
**[Tutorial][tutorial] | [API docs][docs-rs] | [Github][github] | [Crate][crates-io]**

[github]: https://github.com/honzasp/makiko
[tutorial]: https://honzasp.github.io/makiko
[docs-rs]: https://docs.rs/makiko/latest/makiko
[github]: https://github.com/honzasp/makiko
[crates-io]: https://crates.io/crates/makiko

## Features
Expand All @@ -27,6 +28,7 @@ Makiko is an asynchronous SSH client library for Rust.
- Crypto from [Rust Crypto][rust-crypto]
- Use your own sockets, spawn your own tasks
- Uses [Tokio][tokio] interfaces (but does not depend on the Tokio runtime)
- Rust all the way down: no dependency on non-Rust libraries, direct or indirect

[rust-crypto]: https://github.com/RustCrypto
[tokio]: https://tokio.rs/
Expand All @@ -38,6 +40,10 @@ Makiko is an asynchronous SSH client library for Rust.
Makiko gives you a lot of control over the SSH connection, it is meant to be a
building block for libraries and advanced applications.

> Makiko and most of the cryptography crates from [Rust Crypto][rust-crypto]
> that Makiko uses have not yet been audited by a trusted third party. Use at
> your own risk!
## Contributing

Contributions are welcome! Please contact me ([@honzasp][honzasp]) or open a
Expand All @@ -47,4 +53,4 @@ pull request.

## License

This software is released into the public domain. Please see [LICENSE](LICENSE).
This software is released into the public domain. Please see [UNLICENSE](UNLICENSE).
10 changes: 10 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copied from https://github.com/github/gitignore/blob/main/Jekyll.gitignore
# Ignore metadata generated by Jekyll
_site/
.sass-cache/
.jekyll-cache/
.jekyll-metadata

# Ignore folders generated by Bundler
.bundle/
vendor/
6 changes: 6 additions & 0 deletions docs/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source "https://rubygems.org"

gem "jekyll", "~> 4.3"
gem "webrick"

gem "just-the-docs", "0.4.0.rc4"
80 changes: 80 additions & 0 deletions docs/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
colorator (1.1.0)
concurrent-ruby (1.1.10)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.15.5)
forwardable-extended (2.6.0)
http_parser.rb (0.8.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
jekyll (4.3.0)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 1.0)
jekyll-sass-converter (>= 2.0, < 4.0)
jekyll-watch (~> 2.0)
kramdown (~> 2.3, >= 2.3.1)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (>= 0.3.6, < 0.5)
pathutil (~> 0.9)
rouge (>= 3.0, < 5.0)
safe_yaml (~> 1.0)
terminal-table (>= 1.8, < 4.0)
webrick (~> 1.7)
jekyll-sass-converter (2.2.0)
sassc (> 2.0.1, < 3.0)
jekyll-seo-tag (2.8.0)
jekyll (>= 3.8, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
just-the-docs (0.4.0.rc4)
jekyll (>= 3.8.5)
jekyll-seo-tag (>= 2.0)
rake (>= 12.3.1)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.7.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (5.0.0)
rake (13.0.6)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.5)
rouge (4.0.0)
safe_yaml (1.0.5)
sassc (2.4.0)
ffi (~> 1.9)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
unicode-display_width (2.3.0)
webrick (1.7.0)

PLATFORMS
arm64-darwin-21
x86_64-darwin-19
x86_64-linux

DEPENDENCIES
jekyll (~> 4.3)
just-the-docs (= 0.4.0.rc4)
webrick

BUNDLED WITH
2.3.9
27 changes: 27 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
title: "Makiko"
description: "Makiko is an asynchronous SSH client library in pure Rust"
theme: just-the-docs

url: "https://honzasp.github.io/makiko"
baseurl: "/makiko"
aux_links:
"Github": "https://github.com/honzasp/makiko"
"API docs": "https://docs.rs/makiko/latest/makiko"
nav_external_links:
- title: "Makiko on Github"
url: "https://github.com/honzasp/makiko"
- title: "API documentation"
url: "https://docs.rs/makiko/latest/makiko"

color_scheme: "makiko_light"
callouts:
"note":
title: "Note"
color: blue
"warning":
title: "Warning"
color: yellow
favicon_ico: "/favicon.ico"

exclude:
- "Session.vim"
3 changes: 3 additions & 0 deletions docs/_includes/tutorial_next.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<p>
<a href="{% link {{include.link}} %}" class="btn btn-primary">Next: {{include.title}}</a>
</p>
84 changes: 84 additions & 0 deletions docs/_sass/color_schemes/makiko_light.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
$body-text-color: #000;
$body-heading-color: #000;
$link-color: $blue-100;
$btn-primary-color: $blue-100;

// Based on tango.css from https://github.com/jwarby/jekyll-pygments-themes
.highlight .hll { background-color: $grey-lt-000 }

.highlight .err { color: $red-300; border: 1px solid $red-300 } /* Error */
.highlight .o { color: $body-text-color } /* Operator */
.highlight .ow { color: $body-text-color } /* Operator.Word */
.highlight .x { color: $body-text-color } /* Other */
.highlight .p { color: $body-text-color } /* Punctuation */
.highlight .w { color: $grey-lt-000; text-decoration: underline } /* Text.Whitespace */

.highlight .g { color: $body-text-color } /* Generic */
.highlight .gd { color: $red-100 } /* Generic.Deleted */
.highlight .ge { color: $body-text-color; font-style: italic } /* Generic.Emph */
.highlight .gr { color: $red-100 } /* Generic.Error */
.highlight .gh { color: $blue-300; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: $green-100 } /* Generic.Inserted */
.highlight .go { color: $body-text-color; font-style: italic } /* Generic.Output */
.highlight .gp { color: $red-300 } /* Generic.Prompt */
.highlight .gs { color: $body-text-color; font-weight: bold } /* Generic.Strong */
.highlight .gu { color: $purple-200; font-weight: bold } /* Generic.Subheading */
.highlight .gt { color: $red-300; font-weight: bold } /* Generic.Traceback */

.highlight .c { color: $grey-dk-100; font-style: italic } /* Comment */
.highlight .cd { color: $grey-dk-100; font-style: italic } /* Comment.Doc */
.highlight .cm { color: $grey-dk-100; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: $grey-dk-100; font-style: italic } /* Comment.Preproc */
.highlight .c1 { color: $grey-dk-100; font-style: italic } /* Comment.Single */
.highlight .cs { color: $grey-dk-100; font-style: italic } /* Comment.Special */

.highlight .k { color: $blue-100 } /* Keyword */
.highlight .kc { color: $blue-100 } /* Keyword.Constant */
.highlight .kd { color: $blue-100 } /* Keyword.Declaration */
.highlight .kn { color: $blue-100 } /* Keyword.Namespace */
.highlight .kp { color: $blue-100 } /* Keyword.Pseudo */
.highlight .kr { color: $blue-100 } /* Keyword.Reserved */
.highlight .kt { color: $blue-100 } /* Keyword.Type */

.highlight .l { color: $body-text-color } /* Literal */
.highlight .ld { color: $body-text-color } /* Literal.Date */

.highlight .m { color: $blue-300 } /* Literal.Number */
.highlight .mf { color: $blue-300 } /* Literal.Number.Float */
.highlight .mh { color: $blue-300 } /* Literal.Number.Hex */
.highlight .mi { color: $blue-300 } /* Literal.Number.Integer */
.highlight .mo { color: $blue-300 } /* Literal.Number.Oct */
.highlight .il { color: $blue-300 } /* Literal.Number.Integer.Long */

.highlight .s { color: $blue-200 } /* Literal.String */
.highlight .sb { color: $blue-200 } /* Literal.String.Backtick */
.highlight .sc { color: $blue-200 } /* Literal.String.Char */
.highlight .sd { color: $blue-200; font-style: italic } /* Literal.String.Doc */
.highlight .s2 { color: $blue-200 } /* Literal.String.Double */
.highlight .se { color: $blue-200 } /* Literal.String.Escape */
.highlight .sh { color: $blue-200 } /* Literal.String.Heblueoc */
.highlight .si { color: $blue-200 } /* Literal.String.Interpol */
.highlight .sx { color: $blue-200 } /* Literal.String.Other */
.highlight .sr { color: $blue-200 } /* Literal.String.Regex */
.highlight .s1 { color: $blue-200 } /* Literal.String.Single */
.highlight .ss { color: $blue-200 } /* Literal.String.Symbol */

.highlight .n { color: $body-text-color } /* Name */
.highlight .na { color: $red-200 } /* Name.Attribute */
.highlight .nb { color: $body-text-color } /* Name.Builtin */
.highlight .nc { color: $body-text-color } /* Name.Class */
.highlight .no { color: $body-text-color } /* Name.Constant */
.highlight .nd { color: $purple-200 } /* Name.Decorator */
.highlight .ni { color: $red-200 } /* Name.Entity */
.highlight .ne { color: $red-200 } /* Name.Exception */
.highlight .nf { color: $body-text-color } /* Name.Function */
.highlight .nl { color: $red-200 } /* Name.Label */
.highlight .nn { color: $blue-300 } /* Name.Namespace */
.highlight .nx { color: $body-text-color } /* Name.Other */
.highlight .py { color: $body-text-color } /* Name.Property */
.highlight .nt { color: $blue-200; font-weight: bold } /* Name.Tag */
.highlight .nv { color: $body-text-color } /* Name.Variable */
.highlight .bp { color: $red-200 } /* Name.Builtin.Pseudo */
.highlight .vc { color: $body-text-color } /* Name.Variable.Class */
.highlight .vg { color: $body-text-color } /* Name.Variable.Global */
.highlight .vi { color: $body-text-color } /* Name.Variable.Instance */
17 changes: 17 additions & 0 deletions docs/_sass/custom/custom.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.main-content {
a {
text-decoration-color: $link-color;
}

ul > li::before {
color: $grey-dk-100;
}

ol > li::before {
color: $grey-dk-100;
}
}

hr {
background-color: $grey-lt-300;
}
Binary file added docs/favicon.ico
Binary file not shown.
53 changes: 53 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
title: Home
layout: home
---

# {{ site.title }}
{: .fs-9}

{{ site.description }}
{: .fs-6 .fw-300 .text-grey-dk-200}

[Get started](/tutorial){: .btn .btn-primary }
[API docs][docs-rs]{: .btn .ml-4 }
[Github][github]{: .btn .ml-4 }
[Crate][crates-io]{: .btn .ml-4 }

[docs-rs]: https://docs.rs/makiko/latest/makiko
[github]: https://github.com/honzasp/makiko
[crates-io]: https://crates.io/crates/makiko

## Features

- SSH protocol 2
- Authentication methods: publickey, password, none
- Shell/exec sessions
- Remote and local tunnels
- Raw SSH channels (low-level API)
- Ciphers: chacha20-poly1305, aes128-gcm, aes256-gcm, aes128-ctr, aes192-ctr,
aes256-ctr, aes128-cbc\*, aes192-cbc\*, aes256-cbc\*
- MACs: hmac-sha2-256-etm, hmac-sha2-512-etm, hmac-sha2-256, hmac-sha2-512,
hmac-sha1-etm\*, hmac-sha1\*
- Public key algorithms: ssh-ed25519, rsa-sha2-256, rsa-sha2-512,
ecdsa-sha2-nistp256\*, ecdsa-sha2-nistp384\*, ssh-rsa\*
- Key exchange algorithms: curve25519-sha256, diffie-hellman-group14-sha1\*,
diffie-hellman-group14-sha256\*, diffie-hellman-group16-sha512\*,
diffie-hellmann-group18-sha512\*
- Crypto from [Rust Crypto][rust-crypto]
- Use your own sockets, spawn your own tasks
- Uses [Tokio][tokio] interfaces (but does not depend on the Tokio runtime)
- Rust all the way down: no dependency on non-Rust libraries, direct or indirect

[rust-crypto]: https://github.com/RustCrypto
[tokio]: https://tokio.rs/

<i>\* Algorithms marked with an asterisk are not enabled by default</i>
{: .text-grey-dk-200}

## Low-level

Makiko gives you a lot of control over the SSH connection, it is meant to be a building block for libraries and advanced applications.

{: .warning }
Makiko and most of the cryptography crates from [Rust Crypto][rust-crypto] that Makiko uses have not yet been audited by a trusted third party. Use at your own risk!
Loading

0 comments on commit 92754ba

Please sign in to comment.