-
-
Notifications
You must be signed in to change notification settings - Fork 73
[BUG] - Connecting from Win11 to Win11 with key in ssh agent fails #373
Description
Description
I have two Win 11 machines, notebook and workstation. I added my notebooks ssh key as an authorized key to my workstation and added the key to my notebooks ssh agent (i.e. I can ssh into the workstation without a password and wanted that to work in termscp as well).
My workstation is aliased with office_win.
When I open termscp with that alias (i.e. termscp office_win in git bash), it opens termscp, but throws an error
Could not scan current remote directory: could not stat file (protocol error (Could not read directory: [SFTP(2)] no such file))
I can hit enter and the error disappears, but the only entry on the remote side is ".." and using that the failure reappears - there's nothing to browse, really.
Before setting up the passwordless access, I used SCP instead of SFTP, which worked - but I don't think I have the choice anywhere. It logs in, but I cannot choose SCP. Therefore, I cannot really copy anything between the two systems this way.
Steps to reproduce
Setup two Win11 systems
Setup passwordless ssh access from machine a to machine b
Add the key used for passwordless access to machine a's ssh-agent (such that termscp will use it)
Open termscp from machine a to machine b termscp machine_b
Expected behaviour
Ideally, I can browse on both machines
If that is not possible automatically, I should be able to change the protocol
Environment
- OS: Win11
- Architecture: x86_64
- Rust version: 1.91.0
- termscp version: v0.19.0 (new-binary-builds, cf1fdf3, 2025-11-10T15:16:41.412142800Z)
- Protocol used: SFTP / SCP
- Remote server version and name: Win11, SSH-2.0-OpenSSH_for_Windows_9.5
Log
2025-11-12T10:08:06.11805Z [INFO] termscp v0.19.0 (new-binary-builds, cf1fdf3, 2025-11-10T15:16:41.412142800Z) - Developed by Christian Visintin christian.visintin@veeso.dev
2025-11-12T10:08:06.1183403Z [INFO] Starting activity manager...
2025-11-12T10:08:06.1191153Z [INFO] Setting up config client with config path C:\Users\tim1lobn\AppData\Roaming\termscp/config.toml and SSH key directory C:\Users\tim1lobn\AppData\Roaming\termscp/.ssh/
2025-11-12T10:08:06.1260061Z [INFO] Bookmarks client initialized
2025-11-12T10:08:06.1262464Z [INFO] Setting up theme provider with thene path C:\Users\tim1lobn\AppData\Roaming\termscp/theme.toml
2025-11-12T10:08:06.1282018Z [INFO] Starting FileTransferActivity
2025-11-12T10:08:06.1292275Z [INFO] Setting up config client with config path C:\Users\tim1lobn\AppData\Roaming\termscp/config.toml and SSH key directory C:\Users\tim1lobn\AppData\Roaming\termscp/.ssh/
...
2025-11-12T10:08:06.1348186Z [INFO] Localhost initialized with success
...
2025-11-12T10:08:06.147342Z [INFO] Created FileTransferActivity
2025-11-12T10:08:06.1474718Z [INFO] Client is not connected to remote; connecting to office_win:22
2025-11-12T10:08:08.0884672Z [INFO] Authenticated with ssh agent
2025-11-12T10:08:14.2290337Z [INFO] Established connection with 'office_win': "SSH-2.0-OpenSSH_for_Windows_9.5"
2025-11-12T10:08:14.2630649Z [ERROR] Could not scan current remote directory: could not stat file (protocol error (Could not read directory: [SFTP(2)] no such file))
...
2025-11-12T10:08:14.3015138Z [ERROR] Could not scan current remote directory: could not stat file (protocol error (Could not read directory: [SFTP(2)] no such file))
2025-11-12T10:08:16.856195Z [INFO] FileTransferActivity terminated due to 'Quit'
Note that due to active directory, both machines have the same username. I could not distinguish if some log entry was from my notebookd or my workstation - but due to path used, I assume all "Stating file" logs were from my notebook.