Hi,
I'm using SSH2 crate to run commands on a remote system. I tried connecting to a remote system to which I've setup remote access using ssh key. I can connect to it using ssh command. But the below code is returning an empty set for available identities:
let tcp = TcpStream::connect(&format!("{}:22", host))?;
let mut sess = Session::new().context("creating new session failed")?;
sess.set_tcp_stream(tcp);
sess.handshake().context("Handshake failed")?;
// Try to connect to the system's SSH agent
let mut agent = sess.agent()?;
agent.connect()?;
agent.list_identities()?;
let identities = agent.identities()?;
debug!("{:?}", identities);
Could someone please provide me some pointers on why it isnt working as expected ?