PowerShell / PowerShell/Win32-OpenSSH
ssh-keygen fails with tilde ~
Open
Nobody has claimed this yet.
Area-ssh-keygen
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
If you try to use tilde ~ to represent the user's home path ssh-keygen will fail.
Expected behavior
Keys generated successfully
Actual behavior
ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (C:\Users\thomas/.ssh/id_rsa): ~/abc/id_abc
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Saving key "~/abc/id_abc" failed: No such file or directory
Error details
No response
Environment data
Tested in Windows PowerShell 5.1 and PowerShell 7.4.1
Version
8.6.0.1
Visuals
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the ssh-keygen command and reproduce the failure in Windows PowerShell 5.1 or 7.4.1 using a tilde path such as ~/abc/id_abc. Trace how the requested output path is handled and verify that key generation succeeds when the tilde represents the user's home path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, powershell
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100