public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Matthias@gmx.li" <matthias.meyer@gmx.li>
To: cygwin@cygwin.com
Subject: Re: Cygwin 3.4.9 - how to install ssh-keygen
Date: Fri, 24 Nov 2023 12:31:38 +0100	[thread overview]
Message-ID: <cb49e2b78a4818e090b169cc88bfc497024b4d60.camel@gmx.li> (raw)
In-Reply-To: <cba6d8a9769ab61ef5e724607d0f32761b3f9308.camel@gmx.li>

Am Montag, dem 20.11.2023 um 17:54 +0100 schrieb Matthias@gmx.li:
> Dear all,
>
> I've installed cygwin 3.4.9-1 in my virtualbox running on Windows 10.
> After installing defaults plus openssh 9.5p 1-1, I open the Cygwin64-Terminal as Administrator and
> run ssh-host-config.
>  * Answered "yes" to create the /etc/ssh_config and /etc/sshd_config
>  * Answered "no" to use StrictMode
>  * and "yes" to install sshd as a service
>  * I just press <enter> for the question for "Value of CYGWIN for the daemon".
> cygrunsrv -S cygsshd will not start the sshd. The logfile say "no hostkeys available".
>
> Unfortunately  I can't find ssh-keygen in the installable packages.
> Howto install ssh-keygen or how to create hostkeys?
>
> Thanks in advance
> Matthias
>
Hello,

I installed cygwin 3.4.9-1 with all defaults plus openssh 9.5p 1-1 plus rsync 3.2.7-1 in my
virtualbox running on Windows 10 again.

In /var/log/setup.log I found "can't run /etc/postinstall/openssl.sh: No such file"
Anyhow, I opened the Cygwin64-Terminal as Administrator and run ssh-host-config but no host-keys has
been created:
   $ ssh-host-config

   *** Info: Generating missing SSH host keys
   *** Info: Creating default /etc/ssh_config file
   *** Info: Creating default /etc/sshd_config file

   *** Info: StrictModes is set to 'yes' by default.
   *** Info: This is the recommended setting, but it requires that the POSIX
   *** Info: permissions of the user's home directory, the user's .ssh
   *** Info: directory, and the user's ssh key files are tight so that
   *** Info: only the user has write permissions.
   *** Info: On the other hand, StrictModes don't work well with default
   *** Info: Windows permissions of a home directory mounted with the
   *** Info: 'noacl' option, and they don't work at all if the home
   *** Info: directory is on a FAT or FAT32 partition.
   *** Query: Should StrictModes be used? (yes/no) no
   *** Info: Updating /etc/sshd_config file

   *** Query: Do you want to install sshd as a service?
   *** Query: (Say "no" if it is already installed as a service) (yes/no) yes
   *** Query: Enter the value of CYGWIN for the daemon: []

   *** Info: The sshd service has been installed under the LocalSystem
   *** Info: account (also known as SYSTEM). To start the service now, call
   *** Info: `net start cygsshd' or `cygrunsrv -S cygsshd'.  Otherwise, it
   *** Info: will start automatically after the next reboot.

   *** Info: Host configuration finished. Have fun!

   $ ls -alh /etc/ssh*
   -rw-r--r-- 1 SYSTEM Administratoren 1.5K Nov 24 12:02 /etc/ssh_config
   -rw-r--r-- 1 SYSTEM Administratoren 3.1K Nov 24 12:02 /etc/sshd_config

Also running ssh-user-config don't create any keys:
   $ ssh-user-config
   *** Query: Shall I create a SSH2 RSA identity file for you? (yes/no) yes
   *** Info: Generating /home/meyer/.ssh/id_rsa
   *** Query: Do you want to use this identity to login to this machine? (yes/no) yes
   *** Info: Adding to /home/meyer/.ssh/authorized_keys
   cat: /home/meyer/.ssh/id_rsa.pub: No such file or directory
   *** Query: Shall I create a SSH2 DSA identity file for you? (yes/no) no
   *** Query: Shall I create a SSH2 ECDSA identity file for you? (yes/no) no
   *** Query: Shall I create a (deprecated) SSH1 RSA identity file for you? (yes/no) no

   *** Info: Configuration finished. Have fun!

   $ ls -alh $HOME/.ssh
   total 4.0K
   drwxr-xr-x 1 meyer Kein 0 Nov 24 12:11 .
   drwxr-xr-x 1 meyer Kein 0 Nov 24 12:11 ..
   -rw-r--r-- 1 meyer Kein 0 Nov 24 12:11 authorized_keys

An indication of an installation/configuration error of ssh-keygen is that also
   /usr/bin/ssh-keygen -vvf /etc/ssh_host_rsa_key -N '' -t rsa
don't produce any output. Also if it has return value 0. BTW: Windows OpenSSH isn't installed on my
machine.

René Berber wrote that my files have the wrong permissions. But for shure, /home and /home/meyer has
been created during cygwin installation and /home/meyer/.ssh by ssh-user-config.

Which permissions the directories and files should have?
What could the reason be that ssh-keygen don't create any key? Looks like it wouldn't try it?

Thanks in advance
Matthias


  parent reply	other threads:[~2023-11-24 11:31 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-20 16:54 Matthias@gmx.li
2023-11-20 17:16 ` Hans-Bernhard Bröker
2023-11-20 22:41 ` Lee
2023-11-21  8:19   ` Matthias@gmx.li
     [not found]   ` <CAObURJv33N9LRgB-47V2pPguGk0eKw+om29Ft80dNurVWPZPDw@mail.gmail.com>
2023-11-21 19:07     ` Fwd: " Hans-Bernhard Bröker
2023-11-21 19:35       ` Lee
2023-11-27  6:22   ` Marco Atzeri
2023-11-22  2:23 ` Brian Inglis
2023-11-22  7:40   ` Matthias@gmx.li
2023-11-22 15:23     ` Brian Inglis
2023-11-23  8:15       ` Matthias@gmx.li
2023-11-23 16:50         ` René Berber
2023-11-24 11:31 ` Matthias@gmx.li [this message]
2023-11-24 16:57   ` EXTERNAL SENDER: " Dale Lobb (Sys Admin)
2023-11-25 16:12     ` Matthias@gmx.li
2023-11-25 18:45       ` ASSI
2023-11-26 17:12         ` Matthias@gmx.at
2023-11-26 19:21           ` Brian Inglis
2023-11-27  7:46             ` Matthias@gmx.at
2023-11-28 23:37               ` Brian Inglis
2023-11-30 13:16                 ` Cygwin 3.4.9 - how to install ssh-keygen - solved Matthias@gmx.at
2023-11-30 19:18                   ` Jose Isaias Cabrera
2023-11-29 21:13               ` Cygwin 3.4.9 - how to install ssh-keygen Jose Isaias Cabrera
2023-11-29 21:38                 ` Brian Inglis
2023-11-29 21:58                   ` Jose Isaias Cabrera
2023-11-29 22:40                     ` Brian Inglis
2023-11-29 21:56                 ` Eliot Moss
2023-11-29 22:30                 ` René Berber
2023-11-29 22:46                   ` Brian Inglis
2023-11-30  1:03                     ` Jose Isaias Cabrera
2023-11-30  1:33                       ` Ken Brown
2023-11-30  8:00                       ` Eirik Nordbrøden
2023-11-30 19:20                         ` Jose Isaias Cabrera
2023-11-30 19:53                       ` Jose Isaias Cabrera
2023-11-24 18:13   ` René Berber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cb49e2b78a4818e090b169cc88bfc497024b4d60.camel@gmx.li \
    --to=matthias.meyer@gmx.li \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).