Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
alpine-conf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
18
Issues
18
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
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
alpine
alpine-conf
Commits
43e5c986
Commit
43e5c986
authored
Jul 31, 2011
by
Jeff Bilyk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup-sshd: add dropbear support
parent
69f14068
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
30 deletions
+18
-30
setup-alpine.in
setup-alpine.in
+4
-4
setup-sshd.in
setup-sshd.in
+14
-26
No files found.
setup-alpine.in
View file @
43e5c986
...
...
@@ -73,11 +73,11 @@ sed -i -e "s/^127\.0\.0\.1.*/127.0.0.1\t${_hn}.${_dn:-$(get_fqdn)} ${_hn} localh
$PREFIX
/sbin/setup-apkrepos
$PREFIX
/sbin/setup-sshd
$PREFIX
/sbin/setup-ntp
DEFAULT_DISK
=
none
\
$PREFIX
/sbin/setup-disk
-q
$PREFIX
/sbin/setup-apklbu
-i
$PREFIX
/sbin/setup-ntp
$PREFIX
/sbin/setup-sshd
setup-sshd.in
View file @
43e5c986
...
...
@@ -8,48 +8,36 @@ usage() {
cat
<<
__EOF__
usage: setup-sshd [-hnp]
Setup sshd
, turning off server side DNS lookups and password authentication by default
Setup sshd
options:
-h Show this help
-n Don't prompt, just use defaults
-p Leave password authentication enabled
__EOF__
exit
1
}
PASSWORDAUTH
=
"N"
while
getopts
"hnp"
opt
;
do
while
getopts
"hn"
opt
;
do
case
$opt
in
n
)
PROMPT
=
"0"
;;
h
)
usage
;;
p
)
PASSWORDAUTH
=
"Y"
;;
esac
done
if
[
"
$PROMPT
"
!=
"0"
]
;
then
echo
"Setup sshd? (y/N)"
default_read setupsshd
"N"
if
[
"
$setupsshd
"
=
"N"
]
||
[
"
$setupsshd
"
=
"n"
]
;
then
exit
0
fi
echo
"Sshd to setup? (openssh, dropbear, none) [openssh]"
default_read setupsshd
"openssh"
if
[
"
$setupsshd
"
=
"none"
]
;
then
exit
0
fi
exit
1
acfinstalled
=
"
`
apk version acf-core
-q
|
awk
'{print $1}'
`
"
if
[
"
$acfinstalled
"
!=
"ERROR:"
]
;
then
apk add acf-openssh
-q
else
apk add openssh
-q
fi
if
[
"
$PASSWORDAUTH
"
=
"N"
]
;
then
printf
"PasswordAuthentication no
\n
UseDNS no
\n
"
>>
/etc/ssh/sshd_config
else
printf
"UseDNS no
\n
"
>>
/etc/ssh/sshd_config
if
[
"setupsshd"
=
"openssh"
]
;
then
if
[
"
$acfinstalled
"
!=
"ERROR:"
]
;
then
apk add acf-openssh
-q
else
apk add openssh
-q
fi
elif
[
"setupsshd"
=
"dropbear"
]
;
then
apk add dropbear
fi
/etc/init.d/sshd start
...
...
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