0
Use forward slashes for cygwin paths, Backward slash is "the escape character" in linux (and therefore also in cygwin)
$ cygpath --help
cygpath
helps to convert paths+filenames for/from/to cygwin.
Hint: Use Linux paths in cygwin, use Windows paths in windows.
Untested example:
$ cygpath -u "C:\Users\User/.shhs/id_rsa"
/cygdrive/c/UsersUser/.shhs/id_rsa
C:\Users\User/.shhs/id_rsa
) is in the end equal to C:UsersUser/.shhs/id_rsa
- which most likely isn't what you want.
The "Escape character" takes the special meaning out of the character after it, normally a special character, leaving the character literally, as is, in the input (there is more to it than so, but enough here).
Example:
$ echo \$PATH=$PATH $PATH=... $
0
I think you're probably not running the Cygwin ssh-keygen
- what does which ssh-keygen
show? The non-Cygwin ssh-keygen
on my system (which was installed with PuTTY or WinSCP, I can't remember which) has the same behaviour, but can be made to work with:
ssh-keygen -t rsa -f /cygwin64/home/me/.ssh/id_rsa -N "passphrase"
Note:
passphrase
, or -N ""
for an empty passphraseC:
. I have cygwin installed at C:\cygwin64
, so the keys are going in my Cygwin home directory (~/.ssh
) in this example. Make .ssh
first.Or you could just install the Cygwin ssh-keygen
. which ssh-keygen
should then return /usr/bin/ssh-keygen
.
Neither WinSCP nor PuTTy does not come with ssh-keygen
(they come with PuTTYgen). – Martin Prikryl – 2019-07-24T13:16:15.857
@MartinPrikryl: well, I guess you would know... :) – EML – 2019-07-24T13:45:10.677
0
Consider using Microsoft build of OpenSSH. Just download OpenSSH-Win32.zip
or OpenSSH-Win64.zip
, extract the ssh-keygen.exe
and use – no installation needed, no dependencies (on Cygwin or anything else).
If you have Windows 10 version 1803 or newer, you already have OpenSSH built-in. For older versions, you can also easily install it as an Optional feature "OpenSSH Client".
See also Install OpenSSH SFTP client to Windows 7.
So could you give ay examples for using cygpath? – Abu – 2019-07-22T17:02:05.740
cygpath --help
will show you examples if I remember correctly. I'm running Linux nowadays, all computers cleansed, no Windows infection, so cannot verify cygwin examples. IF-u
is the cygpath option to print "Unix" paths, then the example I provided above will be correct. – Hannu – 2019-07-23T18:07:00.683