Am Montag, dem 20.11.2023 um 17:54 +0100 schrieb matth...@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


-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to