Crates.io | ssh_config |
lib.rs | ssh_config |
version | 0.1.0 |
source | src |
created_at | 2020-01-10 13:52:33.316296 |
updated_at | 2020-01-10 13:52:33.316296 |
description | A small package to parse OpenBSD ssh_config config files The motivation for this crate is that libssh2 does not have a ssh_config parser, and there aren't any decent bindings to libssh. |
homepage | https://gitlab.com/INdek/ssh_config |
repository | https://gitlab.com/INdek/ssh_config |
max_upload_size | |
id | 197156 |
size | 42,411 |
A small library to parse OpenBSD ssh_config files.
More documentation on the file format can be found in the OpenBSD man pages.
use ssh_config::SSHConfig;
let config = SSHConfig::parse_str(r#"
Host test-host
Port 22
Username user
"#)?;
let host_settings = config.query("test-host");
assert_eq!(host_settings["Port"], "22");
assert_eq!(host_settings["Username"], "User");
This library is licensed under the Mozilla Public License, v. 2.0. The license file can be found in LICENSE.