I don't know if this is just an artifact of your email, or if this was in your 
original file (though, I suspect it's in the original), but you have a unicode 
"right double quotation mark" after root_authorized_keys rather than an ascii 
"quotation mark".

Looking at a hex dump:

0000000: 7b0a 2263 7573 746f 6d65 725f 6d65 7461  {."customer_meta
0000010: 6461 7461 223a 207b 0a20 2020 2022 726f  data": {.    "ro
0000020: 6f74 5f61 7574 686f 7269 7a65 645f 6b65  ot_authorized_ke
0000030: 7973 e280 9d3a 2022 7373 682d 7273 6120  ys...: "ssh-rsa 

The third byte on line 30 is 0xe2, whereas it should be 0x22, the same as the 
third byte on line 00.

This would certainly lead to customer_metadata not properly validating, and it 
can be a really easy mistake to make if you copied the json from somewhere else.

Incidentally, if you want to update the root_authorized_keys for kvm or lx 
brand zones you also need to set customer_metadata.overwrite_root_akeys to 
OVERWRITE and then run /lib/smartdc/set-root-authorized-keys inside the guest 
(or reboot it, which will execute that script). Afterward you can remove 
customer_metadata.overwrite_root_akeys.

-- 
Brian Bennett
Systems Engineer, Cloud Operations
Joyent, Inc. | www.joyent.com

> On Mar 4, 2018, at 9:45 AM, Chad Leigh Shire.Net LLC <[email protected]> wrote:
> 
> 
> 
> I created a kvm zone with ubuntu.   I did not add the ssh key to the original 
> son. I am trying to do an update.
> 
> Using this page:   
> https://wiki.smartos.org/display/DOC/How+to+create+a+KVM+VM+%28+Hypervisor+virtualized+machine+%29+in+SmartOS
> 
> I made a file like this
> 
> {
> "customer_metadata": {
>     "root_authorized_keys”: "ssh-rsa 
> AAAAB3NzaC1yc2EAAAABIwAAAQEA8aQRt2JAgq6jpQOT5nukO8gI0Vst+EmBtwBz6gnRjQ4Jw8pERLlMAsa7jxmr5yzRA7Ji8M/kxGLbMHJnINdw/TBP1mCBJ49TjDpobzztGO9icro3337oyvXo5unyPTXIv5pal4hfvl6oZrMW9ghjG3MbIFphAUztzqx8BdwCG31BHUWNBdefRgP7TykD+KyhKrBEa427kAi8VpHU0+M9VBd212mhh8Dcqurq1kC/jLtf6VZDO8tu+XalWAIJcMxN3F3002nFmMLj5qi9EwgRzicndJ3U4PtZrD43GocxlT9M5XKcIXO/rYG4zfrnzXbLKEfabctxPMezGK7iwaOY7w==
>  wooyay@houpla"
>   }
> }
> 
> 
> Obviously using my own SSH public key.
> 
> When I run a validate on it I get this:
> 
> # vmadm validate update kvm -f my-server.ssh-key.json 
> {
>   "bad_values": [],
>   "bad_properties": [
>     "customer_metadata"
>   ],
>   "missing_properties": []
> }
> # 
> 
> 
> What do I need to do to be able to add my SSH key to this server so I can log 
> in and do things with it?
> 
> ----
> 
> Related to this same kvm vm:
> 
> I am on a public network only (rented machine at hosting facility) and don’t 
> want the VNC active as it is not protected, according to the page I listed 
> above.   Is there a way to totally turn off the VNC access?
> 
> Is there a way to do something like 
> 
> % vmadm console <UUID>
> 
> to be able to get a plane terminal text console access to the kvm vm?
> 
> 
> Thanks
> Chad
> smartos-discuss | Archives | Modify Your Subscription  

Attachment: smime.p7s
Description: S/MIME cryptographic signature




-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com

Reply via email to