Corinna Vinschen
2013-Aug-05 12:01 UTC
[patch/Cygwin]: Simplify host key generation in ssh-host-config script
Hi, as the subject says, the below patch just simplifies the host key generation in the Cygwin-specific ssh-host-config script. Rather than testing and generating each key, call ssh-keygen -A. Could somebody with checkin rights please apply? Thanks, Corinna Index: contrib/cygwin/ssh-host-config ==================================================================RCS file: /cvs/openssh/contrib/cygwin/ssh-host-config,v retrieving revision 1.33 diff -u -p -r1.33 ssh-host-config --- contrib/cygwin/ssh-host-config 2 Jul 2013 10:06:47 -0000 1.33 +++ contrib/cygwin/ssh-host-config 5 Aug 2013 12:00:39 -0000 @@ -68,54 +68,6 @@ password_value opt_force=no # =====================================================================-# Routine: create_host_keys -# =====================================================================-create_host_keys() { - local ret=0 - - if [ ! -f "${SYSCONFDIR}/ssh_host_key" ] - then - csih_inform "Generating ${SYSCONFDIR}/ssh_host_key" - if ! /usr/bin/ssh-keygen -t rsa1 -f ${SYSCONFDIR}/ssh_host_key -N '' > /dev/null - then - csih_warning "Generating ${SYSCONFDIR}/ssh_host_key failed!" - let ++ret - fi - fi - - if [ ! -f "${SYSCONFDIR}/ssh_host_rsa_key" ] - then - csih_inform "Generating ${SYSCONFDIR}/ssh_host_rsa_key" - if ! /usr/bin/ssh-keygen -t rsa -f ${SYSCONFDIR}/ssh_host_rsa_key -N '' > /dev/null - then - csih_warning "Generating ${SYSCONFDIR}/ssh_host_key failed!" - let ++ret - fi - fi - - if [ ! -f "${SYSCONFDIR}/ssh_host_dsa_key" ] - then - csih_inform "Generating ${SYSCONFDIR}/ssh_host_dsa_key" - if ! /usr/bin/ssh-keygen -t dsa -f ${SYSCONFDIR}/ssh_host_dsa_key -N '' > /dev/null - then - csih_warning "Generating ${SYSCONFDIR}/ssh_host_key failed!" - let ++ret - fi - fi - - if [ ! -f "${SYSCONFDIR}/ssh_host_ecdsa_key" ] - then - csih_inform "Generating ${SYSCONFDIR}/ssh_host_ecdsa_key" - if ! /usr/bin/ssh-keygen -t ecdsa -f ${SYSCONFDIR}/ssh_host_ecdsa_key -N '' > /dev/null - then - csih_warning "Generating ${SYSCONFDIR}/ssh_host_key failed!" - let ++ret - fi - fi - return $ret -} # --- End of create_host_keys --- # - -# ===================================================================== # Routine: update_services_file # ===================================================================== update_services_file() { @@ -719,8 +671,8 @@ then let ++warning_cnt fi -# host keys -create_host_keys || let warning_cnt+=$? +# generate missing host keys +/usr/bin/ssh-keygen -A || let warning_cnt+=$? # handle ssh_config csih_install_config "${SYSCONFDIR}/ssh_config" "${SYSCONFDIR}/defaults" || let ++warning_cnt -- Corinna Vinschen Cygwin Maintainer Red Hat
Darren Tucker
2013-Aug-05 14:47 UTC
[patch/Cygwin]: Simplify host key generation in ssh-host-config script
On Mon, Aug 5, 2013 at 10:01 PM, Corinna Vinschen <vinschen at redhat.com> wrote:> as the subject says, the below patch just simplifies the host > key generation in the Cygwin-specific ssh-host-config script. > Rather than testing and generating each key, call ssh-keygen -A. > > Could somebody with checkin rights please apply?is it urgent enough to apply before the 6.3 release? if not I'll apply it afterward. -- Darren Tucker (dtucker at zip.com.au) GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69 Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.
Corinna Vinschen
2013-Nov-08 12:59 UTC
Re: [patch/Cygwin]: Simplify host key generation in ssh-host-config script
Ping? I sent this patch 5 weeks before 6.3 has been announced and it''s still not in 6.4, unfortunately. Any chance this could be applied soon? Thanks, Corinna On Aug 5 14:01, Corinna Vinschen wrote:> Hi, > > as the subject says, the below patch just simplifies the host > key generation in the Cygwin-specific ssh-host-config script. > Rather than testing and generating each key, call ssh-keygen -A. > > Could somebody with checkin rights please apply? > > > Thanks, > Corinna > > > Index: contrib/cygwin/ssh-host-config > ==================================================================> RCS file: /cvs/openssh/contrib/cygwin/ssh-host-config,v > retrieving revision 1.33 > diff -u -p -r1.33 ssh-host-config > --- contrib/cygwin/ssh-host-config 2 Jul 2013 10:06:47 -0000 1.33 > +++ contrib/cygwin/ssh-host-config 5 Aug 2013 12:00:39 -0000 > @@ -68,54 +68,6 @@ password_value> opt_force=no > > # =====================================================================> -# Routine: create_host_keys > -# =====================================================================> -create_host_keys() { > - local ret=0 > - > - if [ ! -f "${SYSCONFDIR}/ssh_host_key" ] > - then > - csih_inform "Generating ${SYSCONFDIR}/ssh_host_key" > - if ! /usr/bin/ssh-keygen -t rsa1 -f ${SYSCONFDIR}/ssh_host_key -N '''' > /dev/null > - then > - csih_warning "Generating ${SYSCONFDIR}/ssh_host_key failed!" > - let ++ret > - fi > - fi > - > - if [ ! -f "${SYSCONFDIR}/ssh_host_rsa_key" ] > - then > - csih_inform "Generating ${SYSCONFDIR}/ssh_host_rsa_key" > - if ! /usr/bin/ssh-keygen -t rsa -f ${SYSCONFDIR}/ssh_host_rsa_key -N '''' > /dev/null > - then > - csih_warning "Generating ${SYSCONFDIR}/ssh_host_key failed!" > - let ++ret > - fi > - fi > - > - if [ ! -f "${SYSCONFDIR}/ssh_host_dsa_key" ] > - then > - csih_inform "Generating ${SYSCONFDIR}/ssh_host_dsa_key" > - if ! /usr/bin/ssh-keygen -t dsa -f ${SYSCONFDIR}/ssh_host_dsa_key -N '''' > /dev/null > - then > - csih_warning "Generating ${SYSCONFDIR}/ssh_host_key failed!" > - let ++ret > - fi > - fi > - > - if [ ! -f "${SYSCONFDIR}/ssh_host_ecdsa_key" ] > - then > - csih_inform "Generating ${SYSCONFDIR}/ssh_host_ecdsa_key" > - if ! /usr/bin/ssh-keygen -t ecdsa -f ${SYSCONFDIR}/ssh_host_ecdsa_key -N '''' > /dev/null > - then > - csih_warning "Generating ${SYSCONFDIR}/ssh_host_key failed!" > - let ++ret > - fi > - fi > - return $ret > -} # --- End of create_host_keys --- # > - > -# =====================================================================> # Routine: update_services_file > # =====================================================================> update_services_file() { > @@ -719,8 +671,8 @@ then > let ++warning_cnt > fi > > -# host keys > -create_host_keys || let warning_cnt+=$? > +# generate missing host keys > +/usr/bin/ssh-keygen -A || let warning_cnt+=$? > > # handle ssh_config > csih_install_config "${SYSCONFDIR}/ssh_config" "${SYSCONFDIR}/defaults" || let ++warning_cnt > > > -- > Corinna Vinschen > Cygwin Maintainer > Red Hat > _______________________________________________ > openssh-unix-dev mailing list > openssh-unix-dev@mindrot.org > https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev-- Corinna Vinschen Cygwin Maintainer Red Hat _______________________________________________ openssh-unix-dev mailing list openssh-unix-dev@mindrot.org https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
Darren Tucker
2013-Nov-08 13:23 UTC
Re: [patch/Cygwin]: Simplify host key generation in ssh-host-config script
On Fri, Nov 08, 2013 at 01:59:57PM +0100, Corinna Vinschen wrote:> Ping?Sorry, this dropped off my radar. Applied, thanks.> I sent this patch 5 weeks before 6.3 has been announced and it''s still > not in 6.4, unfortunately. Any chance this could be applied soon?6.4p1 is a bit unusual in that it''s branched directly from 6.3p1 and there''s no portable changes in it (even the things already applied to HEAD since 6.3p1). -- Darren Tucker (dtucker at zip.com.au) GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69 Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.
Corinna Vinschen
2013-Nov-08 13:42 UTC
Re: [patch/Cygwin]: Simplify host key generation in ssh-host-config script
On Nov 9 00:23, Darren Tucker wrote:> On Fri, Nov 08, 2013 at 01:59:57PM +0100, Corinna Vinschen wrote: > > Ping? > > Sorry, this dropped off my radar. Applied, thanks.Thank you, Corinna -- Corinna Vinschen Cygwin Maintainer Red Hat _______________________________________________ openssh-unix-dev mailing list openssh-unix-dev@mindrot.org https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
Reasonably Related Threads
- [patch/cygwin] contrib/cygwin/ssh-host-config
- [PATCH/cygwin]: Revised sshh-host-config script
- [patch/cygwin]: Remove setting extra permissions on system directories
- OpenSSH 7.3p1 can't be build on Solaris 10
- [PATCH] contrib/cygwin/ssh-host-config: Improve support for automated updates