Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
HsuJv authored Sep 16, 2023
1 parent fc7a520 commit 9302a3c
Showing 1 changed file with 8 additions and 29 deletions.
37 changes: 8 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")
Expand All @@ -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")
Expand All @@ -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")
Expand All @@ -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()
Expand All @@ -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()
Expand Down Expand Up @@ -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`
Expand All @@ -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`

Expand Down

0 comments on commit 9302a3c

Please sign in to comment.