Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
puppetpublic
base
Commits
f83dfce7
Verified
Commit
f83dfce7
authored
7 years ago
by
Adam Lewenberg
Browse files
Options
Downloads
Patches
Plain Diff
Add @max_sessions option
parent
c595058a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
NEWS
+4
-0
4 additions, 0 deletions
NEWS
manifests/ssh/config/sshd.pp
+6
-0
6 additions, 0 deletions
manifests/ssh/config/sshd.pp
templates/ssh/sshd_config.erb
+9
-0
9 additions, 0 deletions
templates/ssh/sshd_config.erb
with
19 additions
and
0 deletions
NEWS
+
4
−
0
View file @
f83dfce7
release/005.008 (unreleased)
[ssh] Add $max_sessions options. [adamhl]
release/005.007 (2017-06-22)
[kerberos] Add option to completely override /etc/krb5.conf using
...
...
This diff is collapsed.
Click to expand it.
manifests/ssh/config/sshd.pp
+
6
−
0
View file @
f83dfce7
...
...
@@ -26,6 +26,11 @@
#
# If $rootloginwithpswd is set to 'no' then we allow root logins using
# GSSAPI only.
#
# $max_sessions: if you want to allow more than the default of 10
# connections per network connection, set it here. This is particularly
# useful for bastion hosts.
# Default: undef
define
base::ssh::config::sshd
(
$ensure
=
'present'
,
...
...
@@ -41,6 +46,7 @@ define base::ssh::config::sshd(
$listen_ports
=
'22'
,
$rootloginwithpswd
=
'no'
,
$pam_duo
=
false
,
$max_sessions
=
'NOT DEFINED'
,
)
{
if
(
$source
)
{
$template
=
undef
...
...
This diff is collapsed.
Click to expand it.
templates/ssh/sshd_config.erb
+
9
−
0
View file @
f83dfce7
...
...
@@ -121,6 +121,15 @@ Subsystem sftp /usr/lib/openssh/sftp-server
Match User gitolite
ForceCommand /usr/share/gitolite/gitolite-wrapper
<%
end
-%>
<%-
if
(
@max_sessions
!=
'NOT DEFINED'
)
then
-%>
<%-
if
(
@max_sessions
<=
10
)
then
-%>
# Allow fewer sessions
<%-
else
-%>
# Allow more sessions
<%-
end
-%>
MaxSessions
<%=
@max_sessions
%>
<%-
end
-%>
<%
if
(
@pam_duo
)
and
(
@rootloginwithpswd
==
'no'
)
then
-%>
# Because we are enabling Duo but root logins cannot use Duo (yet),
...
...
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