Re: [OE-core] [PATCH] openssh: Atomically generate host keys

2017-06-20 Thread Joshua Watt
On Tue, 2017-06-20 at 10:52 +0200, Ulrich Ölmann wrote: > On Tue, May 23, 2017 at 03:37:16PM +0100, Burton, Ross wrote: > > On 7 May 2017 at 02:33, Joshua Watt wrote: > > > diff --git a/meta/recipes- > > > connectivity/openssh/openssh/sshdgenkeys.service > > > b/meta/recipes-connectivity/openssh/o

Re: [OE-core] [PATCH] openssh: Atomically generate host keys

2017-06-20 Thread Ulrich Ölmann
On Tue, May 23, 2017 at 03:37:16PM +0100, Burton, Ross wrote: > On 7 May 2017 at 02:33, Joshua Watt wrote: > > diff --git a/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service > > b/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service > > index 148e6ad..af56404 100644 > > --- a/

Re: [OE-core] [PATCH] openssh: Atomically generate host keys

2017-05-24 Thread Joshua Watt
7 >> To: Randy Witt >> Cc: OE-core >> Subject: Re: [OE-core] [PATCH] openssh: Atomically generate host keys >> >> On Tue, May 23, 2017 at 12:56 PM, Joshua Watt >> wrote: >> > On Tue, May 23, 2017 at 12:23 PM, Randy Witt >> > wrote: >> &

Re: [OE-core] [PATCH] openssh: Atomically generate host keys

2017-05-24 Thread Peter Kjellerstedt
> -Original Message- > From: openembedded-core-boun...@lists.openembedded.org > [mailto:openembedded-core-boun...@lists.openembedded.org] On Behalf Of > Joshua Watt > Sent: den 23 maj 2017 21:57 > To: Randy Witt > Cc: OE-core > Subject: Re: [OE-core] [PATCH] open

Re: [OE-core] [PATCH] openssh: Atomically generate host keys

2017-05-23 Thread Joshua Watt
On Tue, May 23, 2017 at 12:56 PM, Joshua Watt wrote: > On Tue, May 23, 2017 at 12:23 PM, Randy Witt > wrote: >> On 05/23/2017 08:29 AM, Joshua Watt wrote: >>> >>> On Tue, May 23, 2017 at 9:37 AM, Burton, Ross >>> wrote: On 7 May 2017 at 02:33, Joshua Watt wrote: > > >

Re: [OE-core] [PATCH] openssh: Atomically generate host keys

2017-05-23 Thread Joshua Watt
On Tue, May 23, 2017 at 12:23 PM, Randy Witt wrote: > On 05/23/2017 08:29 AM, Joshua Watt wrote: >> >> On Tue, May 23, 2017 at 9:37 AM, Burton, Ross >> wrote: >>> >>> >>> On 7 May 2017 at 02:33, Joshua Watt wrote: +if [ ! -f "$NAME" ]; then +echo " generating ssh $TYPE k

Re: [OE-core] [PATCH] openssh: Atomically generate host keys

2017-05-23 Thread Randy Witt
On 05/23/2017 08:29 AM, Joshua Watt wrote: On Tue, May 23, 2017 at 9:37 AM, Burton, Ross wrote: On 7 May 2017 at 02:33, Joshua Watt wrote: +if [ ! -f "$NAME" ]; then +echo " generating ssh $TYPE key..." +ssh-keygen -q -f "${NAME}.tmp" -N '' -t $TYPE + +# Sync to ensure data is

Re: [OE-core] [PATCH] openssh: Atomically generate host keys

2017-05-23 Thread Joshua Watt
On Tue, May 23, 2017 at 9:37 AM, Burton, Ross wrote: > > On 7 May 2017 at 02:33, Joshua Watt wrote: >> >> +if [ ! -f "$NAME" ]; then >> +echo " generating ssh $TYPE key..." >> +ssh-keygen -q -f "${NAME}.tmp" -N '' -t $TYPE >> + >> +# Sync to ensure data is written to temp file before

Re: [OE-core] [PATCH] openssh: Atomically generate host keys

2017-05-23 Thread Burton, Ross
On 7 May 2017 at 02:33, Joshua Watt wrote: > +if [ ! -f "$NAME" ]; then > +echo " generating ssh $TYPE key..." > +ssh-keygen -q -f "${NAME}.tmp" -N '' -t $TYPE > + > +# Sync to ensure data is written to temp file before renaming > +sync > + > +# Move (Atomically rename) files

Re: [OE-core] [PATCH] openssh: Atomically generate host keys

2017-05-22 Thread Joshua Watt
Could I get a review of this? I'm somewhat new to submitting patches, so if I'm missing something I probably don't realize it, any feedback is appreciated. Thanks, Joshua Watt On Sat, May 6, 2017 at 8:33 PM, Joshua Watt wrote: > Generating the host keys atomically prevents power interruptions du

[OE-core] [PATCH] openssh: Atomically generate host keys

2017-05-06 Thread Joshua Watt
Generating the host keys atomically prevents power interruptions during the first boot from leaving the key files incomplete, which often prevents users from being able to ssh into the device. Signed-off-by: Joshua Watt --- meta/recipes-connectivity/openssh/openssh/init | 21