Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
base
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Lonlone Lee
base
Commits
f83dfce7
Verified
Commit
f83dfce7
authored
Jun 22, 2017
by
Adam Lewenberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add @max_sessions option
parent
c595058a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
0 deletions
+19
-0
NEWS
NEWS
+4
-0
manifests/ssh/config/sshd.pp
manifests/ssh/config/sshd.pp
+6
-0
templates/ssh/sshd_config.erb
templates/ssh/sshd_config.erb
+9
-0
No files found.
NEWS
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
...
...
manifests/ssh/config/sshd.pp
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
...
...
templates/ssh/sshd_config.erb
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),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment