ssh-test-server

Crates.iossh-test-server
lib.rsssh-test-server
version0.1.1
sourcesrc
created_at2024-11-08 23:19:07.521701
updated_at2024-11-08 23:27:57.875166
descriptionIn memoery ssh server for integration testing.
homepage
repositoryhttps://gitlab.com/mateuszkj/ssh-test-server
max_upload_size
id1441664
size37,648
(mateuszkj)

documentation

https://docs.rs/ssh-test-server

README

In memory ssh server

ssh-test-server provides ssh server to that can be used in integration testing.

Usage

use ssh_test_server::{SshServerBuilder, User};

#[tokio::main(flavor = "current_thread")]
async fn main() {
    let ssh = SshServerBuilder::default()
        .add_user(User::new_admin("root", "pass123"))
        .run()
        .await
        .unwrap();

    println!("ssh -p {} root@{}", ssh.port(), ssh.host());

    tokio::signal::ctrl_c().await.unwrap();
}

Contributions

Contributions are welcome! Please open an issue or submit a pull request on Gitlab.

Before sending pull request please run lints and tests first:

cargo install just
just install-dev
just lint
just test

License

This project is licensed under the MIT OR Apache-2.0 License.

Commit count: 40

cargo fmt