Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Context Sensitive Group
freedombone
Commits
6096ac3b
Commit
6096ac3b
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Make allowing ssh passwords a separate menu entry
parent
a3f2fe45
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-sec
+27
-20
27 additions, 20 deletions
src/freedombone-sec
with
27 additions
and
20 deletions
src/freedombone-sec
+
27
−
20
View file @
6096ac3b
...
...
@@ -175,12 +175,13 @@ function change_ssh_settings {
return
fi
if
[
!
$SSH_PASSWORDS
]
;
then
return
SSH_PASSWORDS
=
'yes'
fi
sed
-i
"s|Ciphers .*|Ciphers
$SSH_CIPHERS
|g"
$SSH_CONFIG
sed
-i
"s|MACs .*|MACs
$SSH_MACS
|g"
$SSH_CONFIG
sed
-i
"s|KexAlgorithms .*|KexAlgorithms
$SSH_KEX
|g"
$SSH_CONFIG
sed
-i
"s|#PasswordAuthentication .*|PasswordAuthentication
$SSH_PASSWORDS
|g"
$SSH_CONFIG
sed
-i
"s|PasswordAuthentication .*|PasswordAuthentication
$SSH_PASSWORDS
|g"
$SSH_CONFIG
systemctl restart ssh
echo
$'ssh server security settings changed'
...
...
@@ -203,6 +204,25 @@ function change_xmpp_settings {
echo
$'xmpp security settings changed'
}
function
allow_ssh_passwords
{
if
[[
$SSH_PASSWORDS
==
"yes"
]]
;
then
dialog
--title
$"SSH Passwords"
\
--backtitle
$"Freedombone Security Configuration"
\
--yesno
$"
\n
Allow SSH login using passwords?"
7 60
else
dialog
--title
$"SSH Passwords"
\
--backtitle
$"Freedombone Security Configuration"
\
--defaultno
\
--yesno
$"
\n
Allow SSH login using passwords?"
7 60
fi
sel
=
$?
case
$sel
in
0
)
SSH_PASSWORDS
=
"yes"
;;
1
)
SSH_PASSWORDS
=
"no"
;;
255
)
exit
0
;;
esac
}
function
interactive_setup
{
if
[
$SSL_CIPHERS
]
;
then
data
=
$(
tempfile 2>/dev/null
)
...
...
@@ -257,23 +277,6 @@ function interactive_setup {
esac
fi
if
[[
$SSH_PASSWORDS
==
"yes"
]]
;
then
dialog
--title
$"SSH Passwords"
\
--backtitle
$"Freedombone Security Configuration"
\
--yesno
$"
\n
Allow SSH login using passwords?"
7 60
else
dialog
--title
$"SSH Passwords"
\
--backtitle
$"Freedombone Security Configuration"
\
--defaultno
\
--yesno
$"
\n
Allow SSH login using passwords?"
7 60
fi
sel
=
$?
case
$sel
in
0
)
SSH_PASSWORDS
=
"yes"
;;
1
)
SSH_PASSWORDS
=
"no"
;;
255
)
exit
0
;;
esac
if
[
$XMPP_CIPHERS
]
;
then
data
=
$(
tempfile 2>/dev/null
)
trap
"rm -f
$data
"
0 1 2 5 15
...
...
@@ -680,7 +683,7 @@ function menu_security_settings {
trap
"rm -f
$data
"
0 1 2 5 15
dialog
--backtitle
$"Freedombone Control Panel"
\
--title
$"Security Settings"
\
--radiolist
$"Choose an operation:"
1
5
76 1
5
\
--radiolist
$"Choose an operation:"
1
6
76 1
6
\
1
$"Regenerate ssh host keys"
off
\
2
$"Regenerate Diffie-Hellman keys"
off
\
3
$"Update cipersuite"
off
\
...
...
@@ -688,7 +691,8 @@ function menu_security_settings {
5
$"Renew Let's Encrypt certificate"
off
\
6
$"Enable GPG based authentication (monkeysphere)"
off
\
7
$"Register a website with monkeysphere"
off
\
8
$"Go Back/Exit"
on 2>
$data
8
$"Allow ssh login with passwords"
off
\
9
$"Go Back/Exit"
on 2>
$data
sel
=
$?
case
$sel
in
1
)
exit
1
;;
...
...
@@ -733,6 +737,9 @@ function menu_security_settings {
register_website
;;
8
)
allow_ssh_passwords
;;
9
)
exit
0
;;
esac
...
...
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