You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Console output needs to be platform sensitive #469
Certain parts of OpenSSh core code needs to be refactored to take into account any output that is platform sensitive. Examples of inaccurate output on Windows
ssh-keygen
Enter file in which to save the key (C:\Users\nwelna/.ssh/id_rsa):
ssh
Add correct host key in C:\\Users\\manojamp/.ssh/known_hosts to get rid of this messag
It appears to work but doesn't actually create the key in the stated directory, or anywhere at all as far as I can tell!
C:\Users\scott>ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (C:\Users\scott/.ssh/id_rsa): smw_gh
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in smw_gh.
Your public key has been saved in smw_gh.pub.
The key fingerprint is:
SHA256:ykkwb+tM+aEluDKxkwASqgRI1hxX1JhhZvAHPGKOXzg scott@INSPIRON7347
The key's randomart image is:
+---[RSA 3072]----+
|ooo..o=O= ||= o.o==.. ||o. * o... ||+. . E .. ||= . * S ||o . * = || . +. O o || * = = . || +. + . |
+----[SHA256]-----+
C:\Users\scott>
Then in a new cmd window
Microsoft Windows [Version 10.0.19043.1165]
(c) Microsoft Corporation. All rights reserved.
C:\Users\scott>cd .ssh\id_rsa
The system cannot find the path specified.
C:\Users\scott>
So I tried to provide a path, but that resulted in an error: No such file or directory.
C:\Users\scott>ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (C:\Users\scott/.ssh/id_rsa): C:\users\scott\.ssh\id_rsa\smw_gh
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Saving key "C:\\users\\scott\\.ssh\\id_rsa\\smw_gh" failed: No such file or directory
In your first example, I believe the files were saved as smw_gh since C:\Users\scott was your current directory:
C:\Users\scott\smw_gh
C:\Users\scott\smw_gh.pub
In your second example, my guess is the directory C:\users\scott\.ssh\id_rsa does not exist. The default, C:\users\scott.ssh\id_rsa, is not a directory; it's the full path to a single file under C:\Users\scott\.ssh.
Got it. They were in my user folder like you suggested. Didn't know that was a file path either. Figured it would create the directory if it didn't exist. I'm good now. Any yes, I deleted those keys and re-ran the command ;).
Activity
scottmwyant commentedon Oct 10, 2021
Do we need to open an issue for this in the other repo, https://github.com/PowerShell/openssh-portable/issues? I'm still seeing this issue. It appears to be a little more severe in my case. Working on gathering information.
It appears to work but doesn't actually create the key in the stated directory, or anywhere at all as far as I can tell!
Then in a new
cmdwindowSo I tried to provide a path, but that resulted in an error:
No such file or directory.Same issue on two different machines so far.
NoMoreFood commentedon Oct 10, 2021
In your first example, I believe the files were saved as
smw_ghsinceC:\Users\scottwas your current directory:In your second example, my guess is the directory
C:\users\scott\.ssh\id_rsadoes not exist. The default, C:\users\scott.ssh\id_rsa, is not a directory; it's the full path to a single file underC:\Users\scott\.ssh.scottmwyant commentedon Oct 10, 2021
Got it. They were in my user folder like you suggested. Didn't know that was a file path either. Figured it would create the directory if it didn't exist. I'm good now. Any yes, I deleted those keys and re-ran the command ;).
Thanks!