Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openssh-formula
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
salt
openssh-formula
Commits
47211d06
Commit
47211d06
authored
11 years ago
by
Carlos Perelló Marín
Browse files
Options
Downloads
Patches
Plain Diff
Added support to manage ssh certificates
parent
6e418aa9
No related branches found
No related tags found
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
LICENSE
+1
-1
1 addition, 1 deletion
LICENSE
README.rst
+13
-7
13 additions, 7 deletions
README.rst
openssh/auth.sls
+43
-0
43 additions, 0 deletions
openssh/auth.sls
openssh/files/sshd_config
+2
-1
2 additions, 1 deletion
openssh/files/sshd_config
pillar.example
+43
-30
43 additions, 30 deletions
pillar.example
with
102 additions
and
39 deletions
LICENSE
+
1
−
1
View file @
47211d06
Copyright (c) 2013 Salt Stack Formulas
Copyright (c) 2013
-2014
Salt Stack Formulas
Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
you may not use this file except in compliance with the License.
...
...
This diff is collapsed.
Click to expand it.
README.rst
+
13
−
7
View file @
47211d06
...
@@ -18,20 +18,26 @@ Available states
...
@@ -18,20 +18,26 @@ Available states
Installs the ``openssh`` server package and service.
Installs the ``openssh`` server package and service.
``openssh.config``
``openssh.auth``
-----------
Manages SSH certificates for users.
``openssh.banner``
------------------
------------------
Installs the ssh daemon configuration file included in this formula
Installs a banner that users see when SSH-ing in.
(under "openssh/files"). This configuration file is populated
by values from pillar. ``pillar.example`` results in the generation
of the default ``sshd_config`` file on Debian Wheezy.
``openssh.client``
``openssh.client``
------------------
------------------
Installs the openssh client package.
Installs the openssh client package.
``openssh.
banner
``
``openssh.
config
``
------------------
------------------
Installs a banner that users see when SSH-ing in.
Installs the ssh daemon configuration file included in this formula
(under "openssh/files"). This configuration file is populated
by values from pillar. ``pillar.example`` results in the generation
of the default ``sshd_config`` file on Debian Wheezy.
This diff is collapsed.
Click to expand it.
openssh/auth.sls
0 → 100644
+
43
−
0
View file @
47211d06
include:
- openssh
{% from "openssh/map.jinja" import openssh with context %}
{% set openssh_pillar = pillar.get('openssh', {}) %}
{% set auth = openssh_pillar.get('auth', {}) %}
{% for user,keys in auth.items() -%}
{% for key in keys -%}
{% if 'present' in key and key['present'] %}
{{ key['name'] }}:
ssh_auth.present:
- user: {{ user }}
{% if 'source' in key %}
- source: {{ key['source'] }}
{% else %}
{% if 'enc' in key %}
- enc: {{ key['enc'] }}
{% endif %}
{% if 'comment' in key %}
- comment: {{ key['comment'] }}
{% endif %}
{% if 'options' in key %}
- options: {{ key['options'] }}
{% endif %}
{% endif %}
- require:
- service: {{ openssh.service }}
{% else %}
{{ key['name'] }}:
ssh_auth.absent:
- user: {{ user }}
{% if 'enc' in key %}
- enc: {{ key['enc'] }}
{% endif %}
{% if 'comment' in key %}
- comment: {{ key['comment'] }}
{% endif %}
{% if 'options' in key %}
- options: {{ key['options'] }}
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
This diff is collapsed.
Click to expand it.
openssh/files/sshd_config
+
2
−
1
View file @
47211d06
{% set sshd_config = pillar.get('sshd_config', {}) %}
{% set openssh_pillar = pillar.get('openssh', {}) %}
{% set sshd_config = openssh_pillar.get('sshd_config', {}) %}
# This file is managed by salt. Manual changes risk being overwritten.
# This file is managed by salt. Manual changes risk being overwritten.
# The contents of the original sshd_config are kept on the bottom for
# The contents of the original sshd_config are kept on the bottom for
...
...
This diff is collapsed.
Click to expand it.
pillar.example
+
43
−
30
View file @
47211d06
openssh:
sshd_config:
sshd_config:
Port: 22
Port: 22
Protocol: 2
Protocol: 2
...
@@ -28,3 +29,15 @@ sshd_config:
...
@@ -28,3 +29,15 @@ sshd_config:
AcceptEnv: "LANG LC_*"
AcceptEnv: "LANG LC_*"
Subsystem: "sftp /usr/lib/openssh/sftp-server"
Subsystem: "sftp /usr/lib/openssh/sftp-server"
UsePAM: yes
UsePAM: yes
auth:
joe:
- name: JOE_VALID_SSH_PUBLIC_KEY
present: True
enc: ssh-rsa
comment: main key
- name: JOE_NON_VALID_SSH_PUBLIC_KEY
present: False
enc: ssh-rsa
comment: obsolete key - removed
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment