Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-4675

Output from "puppet describe ssh_authorized_key" is jumbled

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Duplicate
    • Affects Version/s: PUP 4.1.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Template:

      Description

      The output from puppet describe ssh_authorized_key looks jumbled:

      root@nfd89h99s0jhnls:~/puppet# bundle exec puppet describe ssh_authorized_key | head -n30
       
      ssh_authorized_key
      ==================
      Manages SSH authorized keys. Currently only type 2 keys are supported.
      In their native habitat, SSH keys usually appear as a single long line. This
      resource type requires you to split that line into several attributes. Thus,
      a
      key that appears in your `~/.ssh/id_rsa.pub` file like this...
          ssh-rsa
      ...would translate to the following resource:
      ...would translate to the following resource:
      ...would translate to the following resource:
      ...would translate to the following resource:
      ...would translate to the following resource:
      ...would translate to the following resource:
      ...would translate to the following resource:
      eMue6b3FtUdTDeyAYoTxrsRo/WnDkS6Pa3YhrFwjtUqXfdaQ==
      nick@magpie.puppetlabs.lan
      ...would translate to the following resource:
          ssh_authorized_key { 'nick@magpie.puppetlabs.lan':
            user => 'nick',
            type => 'ssh-rsa',
            key  =>
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
          }
      BmuvPF1Mn3FwaFLjVsMT3GQeMue6b3FtUdTDeyAYoTxrsRo/WnDkS6Pa3YhrFwjtUqXfdaQ==',
          }
      To ensure that only the currently approved keys are present, you can purge
      unmanaged SSH keys on a per-user basis. Do this with the `user` resource
      type's `purge_ssh_keys` attribute:
          user { 'nick':
            ensure         => present,
            purge_ssh_keys => true,
          }
      This will remove any keys in `~/.ssh/authorized_keys` that aren't being
      managed with `ssh_authorized_key` resources. See the documentation of the
      `user` type for more details.
      **Autorequires:** If Puppet is managing the user account in which this
      SSH key should be installed, the `ssh_authorized_key` resource will
      autorequire
      that user.
       
       
      Parameters
      ----------
       
      - **ensure**
          The basic property that the resource should be in.
          Valid values are `present`, `absent`.
       
      - **key**
          The public key itself; generally a long string of hex characters. The
          `key`
          attribute may not contain whitespace.
          Make sure to omit the following in this attribute (and specify them in
          other attributes):
          * Key headers (e.g. 'ssh-rsa') --- put these in the `type` attribute.
          * Key identifiers / comments (e.g. 'joe@joescomputer.local') --- put
          these in
        the `name` attribute/resource title.
       
      - **name**
          The SSH key comment. This attribute is currently used as a
          system-wide primary key and therefore has to be unique.
       
      - **options**
          Key options; see sshd(8) for possible values. Multiple values
          should be specified as an array.
       
      - **target**
          The absolute filename in which to store the SSH key. This
          property is optional and should only be used in cases where keys
          are stored in a non-standard location (i.e.` not in
          `~user/.ssh/authorized_keys`).
       
      - **type**
          The encryption type used.
          Valid values are `ssh-dss` (also called `dsa`), `ssh-rsa` (also called
          `rsa`), `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`,
          `ecdsa-sha2-nistp521`, `ssh-ed25519` (also called `ed25519`).
       
      - **user**
          The user account in which the SSH key should be installed. The resource
          will autorequire this user if it is being managed as a `user` resource.
       
      Providers
      ---------
          parsed
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              kurt.wall Kurt Wall
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support