mirror of
https://github.com/Noratrieb/cluelessh.git
synced 2026-01-15 08:55:06 +01:00
agent
This commit is contained in:
parent
9b49e09983
commit
a52b6b37d7
19 changed files with 770 additions and 92 deletions
|
|
@ -6,6 +6,8 @@ edition = "2021"
|
|||
[dependencies]
|
||||
ssh-protocol = { path = "../ssh-protocol" }
|
||||
ssh-transport = { path = "../ssh-transport" }
|
||||
ssh-agent-client = { path = "../ssh-agent-client" }
|
||||
|
||||
clap = { version = "4.5.15", features = ["derive"] }
|
||||
eyre = "0.6.12"
|
||||
rand = "0.8.5"
|
||||
|
|
|
|||
|
|
@ -79,6 +79,18 @@ async fn main() -> eyre::Result<()> {
|
|||
let _ = send_op.blocking_send(Operation::PasswordEntered(password));
|
||||
});
|
||||
}
|
||||
ssh_protocol::auth::ClientUserRequest::PrivateKeySign {
|
||||
session_identifier: _,
|
||||
} => {
|
||||
// TODO: move
|
||||
let mut agent = ssh_agent_client::SocketAgentConnection::from_env()
|
||||
.await
|
||||
.wrap_err("failed to connect to SSH agent")?;
|
||||
let identities = agent.list_identities().await?;
|
||||
for identity in identities {
|
||||
debug!(comment = ?identity.comment, "Found identity");
|
||||
}
|
||||
}
|
||||
ssh_protocol::auth::ClientUserRequest::Banner(banner) => {
|
||||
let banner = String::from_utf8_lossy(&banner);
|
||||
std::io::stdout().write(&banner.as_bytes())?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue