%PDF- %PDF-
| Direktori : /proc/self/root/proc/3522530/root/usr/lib/python2.7/site-packages/salt/states/ |
| Current File : //proc/self/root/proc/3522530/root/usr/lib/python2.7/site-packages/salt/states/ssh_auth.pyo |
�
���^c @@ s� d Z d d l m Z m Z m Z d d l Z d d l Z d d l m Z d � Z d � Z
d d d d d d d
� Z d d d d d d d � Z
d S( u~
Control of entries in SSH authorized_key files
==============================================
The information stored in a user's SSH authorized key file can be easily
controlled via the ssh_auth state. Defaults can be set by the enc, options,
and comment keys. These defaults can be overridden by including them in the
name.
Since the YAML specification limits the length of simple keys to 1024
characters, and since SSH keys are often longer than that, you may have
to use a YAML 'explicit key', as demonstrated in the second example below.
.. code-block:: yaml
AAAAB3NzaC1kc3MAAACBAL0sQ9fJ5bYTEyY==:
ssh_auth.present:
- user: root
- enc: ssh-dss
? AAAAB3NzaC1kc3MAAACBAL0sQ9fJ5bYTEyY==...
:
ssh_auth.present:
- user: root
- enc: ssh-dss
thatch:
ssh_auth.present:
- user: root
- source: salt://ssh_keys/thatch.id_rsa.pub
- config: '%h/.ssh/authorized_keys'
sshkeys:
ssh_auth.present:
- user: root
- enc: ssh-rsa
- options:
- option1="value1"
- option2="value2 flag2"
- comment: myuser
- names:
- AAAAB3NzaC1kc3MAAACBAL0sQ9fJ5bYTEyY==
- ssh-dss AAAAB3NzaCL0sQ9fJ5bYTEyY== user@domain
- option3="value3" ssh-dss AAAAB3NzaC1kcQ9J5bYTEyY== other@testdomain
- AAAAB3NzaC1kcQ9fJFF435bYTEyY== newcomment
i ( t absolute_importt unicode_literalst print_functionN( t sixc
C@ sG d } | r� t d | | | d t d | �} | r� d } xE t j | � D]4 \ }
} | d k rh qJ n | d j | |
� 7} qJ W| r� | | f Sn t j t d j j j
d d � } | r� t | f St d j | � f Sn� t
j d
� }
|
j | � } | s:| j � } | d } t | � d k r�| d
} q�nr | j d
� rd| j d
� j d � } n | j d � j � } | d } | d
} t | � d k r�| d } n t d | | | | | d | d | �} | d k r�d j | | � } nH | d k rd j | | � } n'