Skip to content

ssh_auth.present changes every time even when there are no modifications to .ssh/authorized_keys #10259

Closed

Description

@pwaller

State:

munin-ssh-key:
  ssh_auth.present:
    - user: munin
    # Copied in directly otherwise options doesn't work, see saltstack/salt#10258
    # - source: salt://munin/config/id_rsa.pub
    - options:
      - no-agent-forwarding
      - no-port-forwarding
      - no-user-rc
      - no-X11-forwarding
      - no-pty
      - command="echo hi"
    - names:
      - ssh-rsa AAAAB3Nza...

Every time I run the state it shows as changes.

----------
    State: - ssh_auth
    Name:      ssh-rsa AAAAB3... munin@...
    Function:  present
        Result:    True
        Comment:   The authorized host key AAAAB3.. for user munin was updated
        Changes:   AAAAB3...: Updated

Expected behaviour: green.

 salt --versions-report
           Salt: 0.17.5
         Python: 2.7.5+ (default, Sep 19 2013, 13:48:49)
         Jinja2: 2.7
       M2Crypto: 0.21.1
 msgpack-python: 0.3.0
   msgpack-pure: Not Installed
       pycrypto: 2.6
         PyYAML: 3.10
          PyZMQ: 13.1.0
            ZMQ: 3.2.3

Activity

  1. basepi commented on Feb 7, 2014

    @basepi
    Contributor

    Hrm, I wonder if options are not parsed, and as such are written each time. That's my bet, and it should be fairly straightforward to fix.

  2. added this to the Outstanding Bugs milestone on Feb 7, 2014
  3. arnisoph commented on Dec 14, 2014

    @arnisoph
    Contributor

    @pwaller Check whether your key is valid. Salt checks if a key is valid using the function _fingerprint() (https://github.com/saltstack/salt/blob/develop/salt/modules/ssh.py#L192). Unfortunately no error is thrown so people don't get to know when a key is invalid.

    @basepi I suggest to close this issue since more than half of a year passed without any user feedback.

  4. arnisoph commented on Dec 14, 2014

    @arnisoph
    Contributor

    #18983 could be a root cause of this.

  5. basepi commented on Dec 15, 2014

    @basepi
    Contributor

    I didn't ask for any specific feedback, so I'm loathe to close it, having not had a chance to actually investigate. =P

  6. arnisoph commented on Dec 16, 2014

    @arnisoph
    Contributor

    hehe, ok :)

  7. pwaller commented on Mar 21, 2015

    @pwaller
    ContributorAuthor

    Seems like this may have been fixed in #19598.

    Tidying up my personal issues list, so closing this. Please create a new issue if you're still interested in tracking it.

  8. added
    Platform
    on May 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    PlatformState-Modulebughelp-wantedseverity-low

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions