PowerShell / PowerShell/Win32-OpenSSH

ssh 9.5p not using ssh-agent

Open
#2,207 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Area-ssh-agent Issue-Bug
Dominant language
No language data
Stars
8.3k
Forks
819
PR merge metrics
No merged PRs in 30d

Description

Prerequisites
  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.
Steps to reproduce

Longtime ssh user but no clue how to fix this..
Using keepassxc to populate the ssh-agent via the gui. This is working fine on multiple windows and linux machine. Also on my current windows dev machine..

Name                           Value
----                           -----
PSVersion                      7.4.1
PSEdition                      Core
GitCommitId                    7.4.1
OS                             Microsoft Windows 10.0.22631
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Its neither working with online feature openssh nor the newest installed via msi. Uninstalled, restarted and reinstalled both independently.

Expected behavior
ssh -T git@github.com
using ed225519 from agent... 
bla bla from github server (no cli)


It should use only the identities from ssh-agent 
ssh.exe and ssh-add.exe are started both from default installation directory C:\ProgramData\ssh
Actual behavior
DE\C:\Users\[me]> ssh-add -l
`256 SHA256:... ed25519-Githubkey-20240110 (ED25519) `


\C:\ProgramData\ssh> ssh -vT git@github.com -vvv
OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2
debug1: Reading configuration data C:\\Users\\[me]/.ssh/config
debug1: C:\\Users\\[me]/.ssh/config line 18: Applying options for *
debug1: Reading configuration data __PROGRAMDATA__\\ssh/ssh_config
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> 'C:\\Users\\[me]/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> 'C:\\Users\\[me]/.ssh/known_hosts2'
debug2: resolving "github.com" port 22
debug3: resolve_host: lookup github.com:22
debug3: ssh_connect_direct: entering
debug1: Connecting to github.com [140.82.121.4] port 22.
debug1: Connection established.
debug3: Failed to open file:C:/Users/[me]/.ssh/id_rsa error:2
debug3: Failed to open file:C:/Users/[me]/.ssh/id_rsa.pub error:2
debug3: failed to open file:C:/Users/[me]/.ssh/id_rsa error:2
debug1: identity file C:\\Users\\[me]/.ssh/id_rsa type -1
debug3: Failed to open file:C:/Users/[me]/.ssh/id_rsa-cert error:2
debug3: Failed to open file:C:/Users/[me]/.ssh/id_rsa-cert.pub error:2
debug3: failed to open file:C:/Users/[me]/.ssh/id_rsa-cert error:2
debug1: identity file C:\\Users\\[me]/.ssh/id_rsa-cert type -1
debug3: Failed to open file:C:/Users/[me]/.ssh/id_ecdsa error:2
debug3: Failed to open file:C:/Users/[me]/.ssh/id_ecdsa.pub error:2
debug3: failed to open file:C:/Users/[me]/.ssh/id_ecdsa error:2
debug1: identity file C:\\Users\\[me]/.ssh/id_ecdsa type -1
debug3: Failed to open file:C:/Users/[me]/.ssh/id_ecdsa-cert error:2
debug3: Failed to open file:C:/Users/[me]/.ssh/id_ecdsa-cert.pub error:2
debug3: failed to open file:C:/Users/[me]/.ssh/id_ecdsa-cert error:2
debug1: identity file C:\\Users\\[me]/.ssh/id_ecdsa-cert type -1
debug3: Failed to open file:C:/Users/[me]/.ssh/id_ecdsa_sk error:2
debug3: Failed to open file:C:/Users/[me]/.ssh/id_ecdsa_sk.pub error:2
debug3: failed to open file:C:/Users/[me]/.ssh/id_ecdsa_sk error:2
debug1: identity file C:\\Users\\[me]/.ssh/id_ecdsa_sk type -1
debug3: Failed to open file:C:/Users/[me]/.ssh/id_ecdsa_sk-cert error:2
debug3: Failed to open file:C:/Users/[me]/.ssh/id_ecdsa_sk-cert.pub error:2
debug3: failed to open file:C:/Users/[me]/.ssh/id_ecdsa_sk-cert error:2
debug1: identity file C:\\Users\\[me]/.ssh/id_ecdsa_sk-cert type -1
debug3: Failed to open file:C:/Users/[me]/.ssh/id_ed25519 error:2
debug3: Failed to open file:C:/Users/[me]/.ssh/id_ed25519.pub error:2
debug3: failed to open file:C:/Users/[me]/.ssh/id_ed25519 error:2
debug1: identity file C:\\Users\\[me]/.ssh/id_ed25519 type -1
debug3: Failed to open file:C:/Users/[me]/.ssh/id_ed25519-cert error:2
debug3: Failed to open file:C:/Users/[me]/.ssh/id_ed25519-cert.pub error:2
debug3: failed to open file:C:/Users/[me]/.ssh/id_ed25519-cert error:2
debug1: identity file C:\\Users\\[me]/.ssh/id_ed25519-cert type -1
debug3: Failed to open file:C:/Users/[me]/.ssh/id_ed25519_sk error:2
debug3: Failed to open file:C:/Users/[me]/.ssh/id_ed25519_sk.pub error:2
debug3: failed to open file:C:/Users/[me]/.ssh/id_ed25519_sk error:2
debug1: identity file C:\\Users\\[me]/.ssh/id_ed25519_sk type -1
debug3: Failed to open file:C:/Users/[me]/.ssh/id_ed25519_sk-cert error:2
debug3: Failed to open file:C:/Users/[me]/.ssh/id_ed25519_sk-cert.pub error:2
debug3: failed to open file:C:/Users/[me]/.ssh/id_ed25519_sk-cert error:2
debug1: identity file C:\\Users\\[me]/.ssh/id_ed25519_sk-cert type -1
debug3: Failed to open file:C:/Users/[me]/.ssh/id_xmss error:2
debug3: Failed to open file:C:/Users/[me]/.ssh/id_xmss.pub error:2
debug3: failed to open file:C:/Users/[me]/.ssh/id_xmss error:2
debug1: identity file C:\\Users\\[me]/.ssh/id_xmss type -1
debug3: Failed to open file:C:/Users/[me]/.ssh/id_xmss-cert error:2
debug3: Failed to open file:C:/Users/[me]/.ssh/id_xmss-cert.pub error:2
debug3: failed to open file:C:/Users/[me]/.ssh/id_xmss-cert error:2
debug1: identity file C:\\Users\\[me]/.ssh/id_xmss-cert type -1
debug3: Failed to open file:C:/Users/[me]/.ssh/id_dsa error:2
debug3: Failed to open file:C:/Users/[me]/.ssh/id_dsa.pub error:2
debug3: failed to open file:C:/Users/[me]/.ssh/id_dsa error:2
debug1: identity file C:\\Users\\[me]/.ssh/id_dsa type -1
debug3: Failed to open file:C:/Users/[me]/.ssh/id_dsa-cert error:2
debug3: Failed to open file:C:/Users/[me]/.ssh/id_dsa-cert.pub error:2
debug3: failed to open file:C:/Users/[me]/.ssh/id_dsa-cert error:2
debug1: identity file C:\\Users\\[me]/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_9.5
debug3: recv - from CB(2) ERROR:138, io:0334E8B0
kex_exchange_identification: read: Connection timed out
banner exchange: Connection to 140.82.121.4 port 22: Connection timed out
DE\C:\ProgramData\ssh>


### Error details

_No response_

### Environment data

```PowerShell
Name                           Value
----                           -----
PSVersion                      7.4.1
PSEdition                      Core
GitCommitId                    7.4.1
OS                             Microsoft Windows 10.0.22631
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Version

OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2

Visuals

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the report on Windows 10 with OpenSSH_for_Windows_9.5p1 and PowerShell 7.4.1: first run ssh-add -l, then ssh -vT git@github.com from the default installation directory. Compare the agent identities with the verbose connection output; done means ssh uses the listed ssh-agent identity and completes the GitHub test connection.

Written by the indexing model from the issue text.

Assessment

Domain
operating-systems, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.