9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] ssh host key
@ 2007-07-27 13:07 erik quanstrom
  2007-07-27 14:29 ` andrey mirtchovski
  0 siblings, 1 reply; 13+ messages in thread
From: erik quanstrom @ 2007-07-27 13:07 UTC (permalink / raw)
  To: 9fans

the sshserve(1) (sic.) man page mentions how to generate a host
key on-the-fly, but doesn't mention where to store the key.

where is the recommend place to stash that key?

- erik


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] ssh host key
  2007-07-27 13:07 [9fans] ssh host key erik quanstrom
@ 2007-07-27 14:29 ` andrey mirtchovski
  2007-07-27 14:34   ` andrey mirtchovski
  0 siblings, 1 reply; 13+ messages in thread
From: andrey mirtchovski @ 2007-07-27 14:29 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

put it in the hostowner's secstore where factotum will pick it up
every time the machine boots. let me know if you need an example.

On 7/27/07, erik quanstrom <quanstro@coraid.com> wrote:
> the sshserve(1) (sic.) man page mentions how to generate a host
> key on-the-fly, but doesn't mention where to store the key.
>
> where is the recommend place to stash that key?
>
> - erik
>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] ssh host key
  2007-07-27 14:29 ` andrey mirtchovski
@ 2007-07-27 14:34   ` andrey mirtchovski
  2007-07-27 15:41     ` erik quanstrom
  2007-07-27 16:27     ` erik quanstrom
  0 siblings, 2 replies; 13+ messages in thread
From: andrey mirtchovski @ 2007-07-27 14:34 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

sorry, i wasn't clear. factotum won't pick up the file from secstore
by itself because secstored isn't started by the time the hostowner's
factotum starts, so you'll have to do it by yourself. this is a
typical cpurc for a cpu server running ssh:

	auth/secstored
	auth/secstore -n -G factotum > /mnt/factotum/ctl

with the host key in the factotum file, of course.

andrey

On 7/27/07, andrey mirtchovski <mirtchovski@gmail.com> wrote:
> put it in the hostowner's secstore where factotum will pick it up
> every time the machine boots. let me know if you need an example.
>
> On 7/27/07, erik quanstrom <quanstro@coraid.com> wrote:
> > the sshserve(1) (sic.) man page mentions how to generate a host
> > key on-the-fly, but doesn't mention where to store the key.
> >
> > where is the recommend place to stash that key?
> >
> > - erik
> >
>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] ssh host key
  2007-07-27 14:34   ` andrey mirtchovski
@ 2007-07-27 15:41     ` erik quanstrom
  2007-07-27 16:27     ` erik quanstrom
  1 sibling, 0 replies; 13+ messages in thread
From: erik quanstrom @ 2007-07-27 15:41 UTC (permalink / raw)
  To: 9fans

heh.  this is exactly the dance i was worried about.
for some reason, i didn't notice the -n option to 
secstore.

alles klar.

- erik


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] ssh host key
  2007-07-27 14:34   ` andrey mirtchovski
  2007-07-27 15:41     ` erik quanstrom
@ 2007-07-27 16:27     ` erik quanstrom
  2007-07-27 16:33       ` Francisco J Ballesteros
  2007-07-27 16:37       ` andrey mirtchovski
  1 sibling, 2 replies; 13+ messages in thread
From: erik quanstrom @ 2007-07-27 16:27 UTC (permalink / raw)
  To: 9fans

i get this error

	ladd# auth/secstore -nG factotum
	ladd# echo $status
	secstore 1517: invalid password in nvram

however if i do it this way, it works:

	ladd# auth/secstore -G factotum
	secstore password: <same password entered>
	secstore
	<keys printed here>

i have a longish password, but it doesn't exceed ANAMELEN.
does nvram truncate the password?  are there any magic characters
which must be avoided?

- erik


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] ssh host key
  2007-07-27 16:27     ` erik quanstrom
@ 2007-07-27 16:33       ` Francisco J Ballesteros
  2007-07-27 16:37       ` andrey mirtchovski
  1 sibling, 0 replies; 13+ messages in thread
From: Francisco J Ballesteros @ 2007-07-27 16:33 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I don't know about len limits, but mine has really weird characters and
works fine in nvram. This may seem silly, but, have you checked out that
your password is nvram is indeed ok? [that was a mistake I made]
You could try after rewriting it.

On 7/27/07, erik quanstrom <quanstro@coraid.com> wrote:
> i get this error
>
>         ladd# auth/secstore -nG factotum
>         ladd# echo $status
>         secstore 1517: invalid password in nvram
>
> however if i do it this way, it works:
>
>         ladd# auth/secstore -G factotum
>         secstore password: <same password entered>
>         secstore
>         <keys printed here>
>
> i have a longish password, but it doesn't exceed ANAMELEN.
> does nvram truncate the password?  are there any magic characters
> which must be avoided?
>
> - erik
>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] ssh host key
  2007-07-27 16:27     ` erik quanstrom
  2007-07-27 16:33       ` Francisco J Ballesteros
@ 2007-07-27 16:37       ` andrey mirtchovski
  2007-07-27 16:40         ` Francisco J Ballesteros
  1 sibling, 1 reply; 13+ messages in thread
From: andrey mirtchovski @ 2007-07-27 16:37 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

invalidate the nvram first and make sure you set the secstore password
correctly to the one that you have set for hostowner's user in
secstored when it asks you on the next reboot. if you have done
already then simply cat the nvram partition: you should be able to see
it in full and in plain text and see if it's truncated.

if the system and secstore passwords are different for hostowner
perhaps there may be a bug in parsing the nvram. they are the same
around here so i've never tested that condition.

On 7/27/07, erik quanstrom <quanstro@coraid.com> wrote:
> i get this error
>
>         ladd# auth/secstore -nG factotum
>         ladd# echo $status
>         secstore 1517: invalid password in nvram
>
> however if i do it this way, it works:
>
>         ladd# auth/secstore -G factotum
>         secstore password: <same password entered>
>         secstore
>         <keys printed here>
>
> i have a longish password, but it doesn't exceed ANAMELEN.
> does nvram truncate the password?  are there any magic characters
> which must be avoided?
>
> - erik
>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] ssh host key
  2007-07-27 16:37       ` andrey mirtchovski
@ 2007-07-27 16:40         ` Francisco J Ballesteros
  2007-07-27 16:57           ` erik quanstrom
  2007-07-27 17:08           ` geoff
  0 siblings, 2 replies; 13+ messages in thread
From: Francisco J Ballesteros @ 2007-07-27 16:40 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

>
> if the system and secstore passwords are different for hostowner
> perhaps there may be a bug in parsing the nvram. they are the same
> around here so i've never tested that condition.

We use different passwords for system and secstore, and it works just fine.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] ssh host key
  2007-07-27 16:40         ` Francisco J Ballesteros
@ 2007-07-27 16:57           ` erik quanstrom
  2007-07-27 17:03             ` Francisco J Ballesteros
  2007-07-27 17:08           ` geoff
  1 sibling, 1 reply; 13+ messages in thread
From: erik quanstrom @ 2007-07-27 16:57 UTC (permalink / raw)
  To: 9fans

> I don't know about len limits, but mine has really weird characters and
> works fine in nvram. This may seem silly, but, have you checked out that
> your password is nvram is indeed ok? [that was a mistake I made]
> You could try after rewriting it.

well, the password does authenticate with the fs and
i did use auth/wrkey to rewrite it, just in case.

- erik


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] ssh host key
  2007-07-27 16:57           ` erik quanstrom
@ 2007-07-27 17:03             ` Francisco J Ballesteros
  2007-07-27 17:22               ` erik quanstrom
  0 siblings, 1 reply; 13+ messages in thread
From: Francisco J Ballesteros @ 2007-07-27 17:03 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

And the secstore password?

On 7/27/07, erik quanstrom <quanstro@coraid.com> wrote:
> > I don't know about len limits, but mine has really weird characters and
> > works fine in nvram. This may seem silly, but, have you checked out that
> > your password is nvram is indeed ok? [that was a mistake I made]
> > You could try after rewriting it.
>
> well, the password does authenticate with the fs and
> i did use auth/wrkey to rewrite it, just in case.
>
> - erik
>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] ssh host key
  2007-07-27 16:40         ` Francisco J Ballesteros
  2007-07-27 16:57           ` erik quanstrom
@ 2007-07-27 17:08           ` geoff
  2007-07-27 17:21             ` erik quanstrom
  1 sibling, 1 reply; 13+ messages in thread
From: geoff @ 2007-07-27 17:08 UTC (permalink / raw)
  To: 9fans

The NVRAM secstore password is limited to 14 bytes; see Nvrsafe in
<authsrv.h>.

The other passwords are DES-encrypted into 7-byte keys for storage in
NVRAM.  See libauthsrv/passtokey.c for details.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] ssh host key
  2007-07-27 17:08           ` geoff
@ 2007-07-27 17:21             ` erik quanstrom
  0 siblings, 0 replies; 13+ messages in thread
From: erik quanstrom @ 2007-07-27 17:21 UTC (permalink / raw)
  To: 9fans

i was just looking into that.  thanks.  we have a winner.

many thanks.  why is it called the "secstore key" and not the "secstore password"?

- erik


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] ssh host key
  2007-07-27 17:03             ` Francisco J Ballesteros
@ 2007-07-27 17:22               ` erik quanstrom
  0 siblings, 0 replies; 13+ messages in thread
From: erik quanstrom @ 2007-07-27 17:22 UTC (permalink / raw)
  To: 9fans

the length limit is actually 13 characters.  the field is 14 characters wide and
null terminated.

- erik


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2007-07-27 17:22 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-27 13:07 [9fans] ssh host key erik quanstrom
2007-07-27 14:29 ` andrey mirtchovski
2007-07-27 14:34   ` andrey mirtchovski
2007-07-27 15:41     ` erik quanstrom
2007-07-27 16:27     ` erik quanstrom
2007-07-27 16:33       ` Francisco J Ballesteros
2007-07-27 16:37       ` andrey mirtchovski
2007-07-27 16:40         ` Francisco J Ballesteros
2007-07-27 16:57           ` erik quanstrom
2007-07-27 17:03             ` Francisco J Ballesteros
2007-07-27 17:22               ` erik quanstrom
2007-07-27 17:08           ` geoff
2007-07-27 17:21             ` erik quanstrom

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 NNTP newsgroup(s).