-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
8 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,8 +47,7 @@ or [PR](https://github.com/1148118271/ssh-rs/pulls) . | |
|
||
```rust | ||
use ssh; | ||
use tracing::Level; | ||
use tracing_subscriber::FmtSubscriber; | ||
|
||
let mut session = ssh::create_session() | ||
.username("ubuntu") | ||
.password("password") | ||
|
@@ -70,8 +69,7 @@ let mut session = ssh::create_session() | |
// -----END RSA PRIVATE KEY----- / -----END OPENSSH PRIVATE KEY----- | ||
// simply generated by `ssh-keygen -t rsa -m PEM -b 4096` | ||
use ssh; | ||
use tracing::Level; | ||
use tracing_subscriber::FmtSubscriber; | ||
|
||
let mut session = ssh::create_session() | ||
.username("ubuntu") | ||
.private_key_path("./id_rsa") | ||
|
@@ -87,8 +85,7 @@ let mut session = ssh::create_session() | |
// and end with | ||
// -----END RSA PRIVATE KEY----- / -----END OPENSSH PRIVATE KEY----- | ||
use ssh; | ||
use tracing::Level; | ||
use tracing_subscriber::FmtSubscriber; | ||
|
||
let mut session = ssh::create_session() | ||
.username("ubuntu") | ||
.private_key("rsa_string") | ||
|
@@ -102,8 +99,7 @@ let mut session = ssh::create_session() | |
|
||
```Rust | ||
use ssh; | ||
use tracing::Level; | ||
use tracing_subscriber::FmtSubscriber; | ||
|
||
let mut session = ssh::create_session() | ||
.username("username") | ||
.password("password") | ||
|
@@ -117,9 +113,9 @@ let mut session = ssh::create_session() | |
* This crate now uses the `log` compatible `tracing` for logging functionality | ||
|
||
```rust | ||
use ssh; | ||
use tracing::Level; | ||
use tracing_subscriber::FmtSubscriber; | ||
|
||
// this will generate some basic event logs | ||
// a builder for `FmtSubscriber`. | ||
let subscriber = FmtSubscriber::builder() | ||
|
@@ -138,10 +134,7 @@ tracing::subscriber::set_global_default(subscriber).expect("setting default subs | |
|
||
```rust | ||
use ssh; | ||
use tracing::Level; | ||
use tracing_subscriber::FmtSubscriber; | ||
|
||
ssh::debug(); | ||
let _listener = TcpListener::bind("127.0.0.1:7777").unwrap(); | ||
|
||
match ssh::create_session() | ||
|
@@ -184,12 +177,8 @@ match ssh::create_session() | |
* `rsa-sha2-512` | ||
* `rsa-sha` (behind feature "deprecated-rsa-sha1") | ||
|
||
### 3. Encryption algorithms (client to server) | ||
|
||
* `[email protected]` | ||
* `aes128-ctr` | ||
|
||
### 4. Encryption algorithms (server to client) | ||
### 3. Encryption algorithms | ||
|
||
* `[email protected]` | ||
* `aes128-ctr` | ||
|
@@ -200,23 +189,13 @@ match ssh::create_session() | |
* `aes256-cbc` (behind feature "deprecated-aes-cbc") | ||
* `3des-cbc` (behind feature "deprecated-des-cbc") | ||
|
||
### 5. Mac algorithms (client to server) | ||
### 4. Mac algorithms | ||
|
||
* `hmac-sha2-256` | ||
* `hmac-sha2-512` | ||
* `hmac-sha1` | ||
|
||
### 6. Mac algorithms (server to client) | ||
|
||
* `hmac-sha2-256` | ||
* `hmac-sha2-512` | ||
* `hmac-sha1` | ||
|
||
### 7. Compression algorithms (client to server) | ||
|
||
* `none` | ||
|
||
### 8. Compression algorithms (server to client) | ||
### 5. Compression algorithms | ||
|
||
* `none` | ||
|
||
|