Comments (7)
@theking2, can you share your logs? When were these keys generated? Were they generated with Win32-OpenSSH?
You can get the logs by running the ssh-agent with the -ddd
parameter.
- client side: run
ssh-agent
in debug modeStop-Service ssh-agent
(if agent service is running)ssh-agent.exe -ddd
run via cmd or powershell- This will dump debug logs in real time to stdout on the console
from win32-openssh.
As administrator
> ssh-agent -ddd
agent_start pid:20244, dbg:1
No other lines are written
in another powershell:
> ssh-add .\id_email_example_com
Could not add identity ".\id_email_example_com": invalid format
> cat \id_email_example_com
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
QyNTUxOQAAACBSRZn1EZ7AX9VnPmFT0eRnXlXVtD4p5i7vZxuIBugNOAAAAJio+jAzqPow
MwAAAAtzc2gtZWQyNTUxOQAAACBSRZn1EZ7AX9VnPmFT0eRnXlXVtD4p5i7vZxuIBugNOA
AAAEAPy7z35qhBjE+zSgwGkjF9VJQ/EhS7NSDMZEiwECDOAVJFmfURnsBf1Wc+YVPR5Gde
VdW0PinmLu9nG4gG6A04AAAAEWVtYWlsQGV4YW1wbGUuY29tAQIDBA==
-----END OPENSSH PRIVATE KEY-----
The key has a single trailing 0x0A
. Format-hex .\id_email_example_com
:
00000000 2D 2D 2D 2D 2D 42 45 47 49 4E 20 4F 50 45 4E 53 -----BEGIN OPENS
00000010 53 48 20 50 52 49 56 41 54 45 20 4B 45 59 2D 2D SH PRIVATE KEY--
00000020 2D 2D 2D 0A 62 33 42 6C 62 6E 4E 7A 61 43 31 72 ---.b3BlbnNzaC1r
00000030 5A 58 6B 74 64 6A 45 41 41 41 41 41 42 47 35 76 ZXktdjEAAAAABG5v
00000040 62 6D 55 41 41 41 41 45 62 6D 39 75 5A 51 41 41 bmUAAAAEbm9uZQAA
00000050 41 41 41 41 41 41 41 42 41 41 41 41 4D 77 41 41 AAAAAAABAAAAMwAA
00000060 41 41 74 7A 63 32 67 74 5A 57 0A 51 79 4E 54 55 AAtzc2gtZW.QyNTU
00000070 78 4F 51 41 41 41 43 42 53 52 5A 6E 31 45 5A 37 xOQAAACBSRZn1EZ7
00000080 41 58 39 56 6E 50 6D 46 54 30 65 52 6E 58 6C 58 AX9VnPmFT0eRnXlX
00000090 56 74 44 34 70 35 69 37 76 5A 78 75 49 42 75 67 VtD4p5i7vZxuIBug
000000A0 4E 4F 41 41 41 41 4A 69 6F 2B 6A 41 7A 71 50 6F NOAAAAJio+jAzqPo
000000B0 77 0A 4D 77 41 41 41 41 74 7A 63 32 67 74 5A 57 w.MwAAAAtzc2gtZW
000000C0 51 79 4E 54 55 78 4F 51 41 41 41 43 42 53 52 5A QyNTUxOQAAACBSRZ
000000D0 6E 31 45 5A 37 41 58 39 56 6E 50 6D 46 54 30 65 n1EZ7AX9VnPmFT0e
000000E0 52 6E 58 6C 58 56 74 44 34 70 35 69 37 76 5A 78 RnXlXVtD4p5i7vZx
000000F0 75 49 42 75 67 4E 4F 41 0A 41 41 41 45 41 50 79 uIBugNOA.AAAEAPy
00000100 37 7A 33 35 71 68 42 6A 45 2B 7A 53 67 77 47 6B 7z35qhBjE+zSgwGk
00000110 6A 46 39 56 4A 51 2F 45 68 53 37 4E 53 44 4D 5A jF9VJQ/EhS7NSDMZ
00000120 45 69 77 45 43 44 4F 41 56 4A 46 6D 66 55 52 6E EiwECDOAVJFmfURn
00000130 73 42 66 31 57 63 2B 59 56 50 52 35 47 64 65 0A sBf1Wc+YVPR5Gde.
00000140 56 64 57 30 50 69 6E 6D 4C 75 39 6E 47 34 67 47 VdW0PinmLu9nG4gG
00000150 36 41 30 34 41 41 41 41 45 57 56 74 59 57 6C 73 6A04AAAAEWVtYWls
00000160 51 47 56 34 59 57 31 77 62 47 55 75 59 32 39 74 QGV4YW1wbGUuY29t
00000170 41 51 49 44 42 41 3D 3D 0A 2D 2D 2D 2D 2D 45 4E AQIDBA==.-----EN
00000180 44 20 4F 50 45 4E 53 53 48 20 50 52 49 56 41 54 D OPENSSH PRIVAT
00000190 45 20 4B 45 59 2D 2D 2D 2D 2D 0A E KEY-----.
from win32-openssh.
Formatted as a single line (removing all but the last 0x0A
) has the same result.
Removing all 0x0A
has the same result.
from win32-openssh.
Removed an reinstalled OpenSSH-client from Settings/Optional
from win32-openssh.
> Get-Command ssh-add
CommandType Name Version Source
----------- ---- ------- ------
Application ssh-add.exe 8.1.0.1 C:\Windows\System32\OpenSSH\ssh-add.exe
> Get-Command ssh-agent
CommandType Name Version Source
----------- ---- ------- ------
Application ssh-agent.exe 8.1.0.1 C:\Windows\System32\OpenSSH\ssh-agent.exe
from win32-openssh.
Mystery solved.
From another agent there was a left-over system environment variable SSL_AUTH_SOCK
. It almost looks like either ssh-agent
or ssh-add
does not observe this variable. I believe ssh-agent creates named pipe openssh-ssh-agent
regardless of the setting of SSH_AUTH_SOCK
. This could be considered as a bug. Both ssh-agent and ssh-add should use the same named pipe.
Suggestion
In the bug report include a section to provide the current system environment variables as the output of [System.Environment]::GetEnvironmentVariables([System.EnvironmentVariableTarget]::Machine)
or perhaps Get-Content
or simply Get-Content Env:SSH_AUTH_SOCK
. For better trouble shooting
from win32-openssh.
I reopen as I made a suggestion that could be included in the bug template
from win32-openssh.
Related Issues (20)
- "SSH-2.0-OpenSSH_for_Windows_9.5' is not recognized as an internal or external command, operable program or batch file. HOT 15
- Use of ProxyCommand causes ssh session to never continue prompting for input HOT 2
- Unable to authenticate when sshd_config is using Match Group administrators in a domain configuration HOT 15
- User permission error HOT 6
- ssh-agent present in .gitignore HOT 1
- Match group administrators comment missing a '#' in front of line HOT 3
- Permission denied - I can't connect on my machine by OpenSSH HOT 1
- Error when putting file with permissions while ChrootDirectory is set
- Permission Denied Reading authroized_keys File HOT 2
- The description for Event ID 4 from source OpenSSH cannot be found
- Please include build with utf-8 included
- ssh-agent either autostart by default or allow user session mode as on other platforms
- ssh-add gives invalid format error
- ssh ok, but scp got "lost connection" caused by "debug3: ReadFileEx() ERROR:109, io:00000270A87CDA70" HOT 2
- winget install option for client only install HOT 4
- SCP Fails 100% of times if the shell profile outputs anything HOT 1
- > ### Prerequisites
- stored credentionals (e.g. cmdkey) with password authentication doesn't work
- install openSSH service in the background with the latest version package HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from win32-openssh.