PowerShell / Win32-OpenSSH

Win32 port of OpenSSH
7.2k stars 739 forks source link

ssh-keygen fails with tilde ~ #2206

Open ThomasNieto opened 4 months ago

ThomasNieto commented 4 months ago

Prerequisites

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