Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inspecting SSH agent deadlocks on windows #309

Open
unicorn-madness13 opened this issue Dec 12, 2023 · 0 comments
Open

inspecting SSH agent deadlocks on windows #309

unicorn-madness13 opened this issue Dec 12, 2023 · 0 comments

Comments

@unicorn-madness13
Copy link

While following the Inspecting SSH Agent example, I experience a deadlock while trying to list the identities. Snippet of my code provided below.

I have ensured that ssh-agent is running and that keys are available as evident by running ssh-add -l. I am on Windows 10, using Mingw64 (Msys2). Rust version is 1.72.1

use ssh2::Session;

fn main() {
    let sess = Session::new().unwrap();
    let mut agent = sess.agent().unwrap();
    println!("agent created");

    agent.connect().unwrap();
    println!("agent connected");

    agent.list_identities().unwrap();
    println!("identities loaded");

    let values = agent.identities().unwrap();
    for v in values {
        dbg!(&v);
    }
}

Output:

$ eval `ssh-agent`
Agent pid blah

$ ssh-add
Identity added: blah

$ cargo run
agent created
agent connected

After the "agent connected" output is where the exe deadlocks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant