dlech / KeeAgent

ssh agent plugin for KeePass 2.x
http://lechnology.com/software/keeagent
Other
522 stars 35 forks source link

Can I use the key constraints over putty agent forwarding? #373

Closed crash5 closed 1 year ago

crash5 commented 1 year ago

Hi!

I try to make a constraint for my key, but I always get "sign_and_send_pubkey: signing failed for ED25519 "" from agent: agent refused operation"

I am connecting to a remote server "S" with putty with agent forwarding enabled (keeagent as agent). I try to reach github.com but I can't make it work.

on the constraint settings I set these: from host: S-host name keys: S-host ED25519 public key to user: git to host: github.com keys: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl

github key is from https://api.github.com/meta

If i remove these constraint or just uncheck the use constraint option it works. From local machine with a constraint with empty from values and the same github values from above I can reach the github.

the remote ssh server version: OpenSSH_8.9p1 Ubuntu-3, OpenSSL 3.0.2 15 Mar 2022 (ubuntu 22.04 lts)

dlech commented 1 year ago

Which version of KeeAgent? Agent mode or Client mode? Operating system?

crash5 commented 1 year ago

Keeagent as agent - v0.13.2/v0.13.3 Windows 10 Putty 0.77

I'm trying to reach github through the remote server with a constraint.

crash5 commented 1 year ago

It is look like it can't recognize the middle server on a simple direct connection either. It has 3 different host key and I added all of them to the destination host settinng in keeagent: ecdsa, ed25519, rsa_key.

There is a way to see what is the hostname and host key the agent receives from putty?

dlech commented 1 year ago

Can you provide a Docker container config to reproduce the problem (similar to existing ones in https://github.com/dlech/SshAgentLib/tree/master/docker).

dlech commented 1 year ago

I don't think PuTTY supports constraints. You would need to use OpenSSH instead.