Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
aports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
alpine
aports
Commits
06016037
Commit
06016037
authored
9 months ago
by
Thermi
Committed by
Natanael Copa
9 months ago
Browse files
Options
Downloads
Patches
Plain Diff
community/tinyssh: use ucspi-tcp6 instead of s6-networking and set myself as maintainer
parent
35f141c5
No related branches found
No related tags found
1 merge request
!64871
community/tinyssh: use ucspi-tcp6 instead of s6-networking and set myself as maintainer
Pipeline
#229726
skipped
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
community/tinyssh/APKBUILD
+11
-11
11 additions, 11 deletions
community/tinyssh/APKBUILD
community/tinyssh/tinyssh.initd
+7
-18
7 additions, 18 deletions
community/tinyssh/tinyssh.initd
with
18 additions
and
29 deletions
community/tinyssh/APKBUILD
+
11
−
11
View file @
06016037
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer:
Stuart Cardall <developer@it-offshore.co.uk
>
# Maintainer:
Noel Kuntze <noel.kuntze@contauro.com
>
pkgname
=
tinyssh
pkgver
=
20240101
pkgrel
=
0
pkgrel
=
1
pkgdesc
=
"Small SSH server using NaCl / TweetNaCl (no dependency on OpenSSL)"
url
=
"https://tinyssh.org/"
license
=
"CC0-1.0"
arch
=
"all !riscv64"
_openrc_deps
=
"
s6-networking
"
_openrc_deps
=
"
ucspi-tcp6
"
makedepends
=
"libsodium-dev"
options
=
"!check"
subpackages
=
"
$pkgname
-doc
$pkgname
-openrc"
source
=
"
$pkgname
-
$pkgver
.tar.gz::https://github.com/janmojzis/tinyssh/archive/
$pkgver
.tar.gz
source
=
"
$pkgname
-
$pkgver
.tar.gz::https://github.com/janmojzis/tinyssh/archive/
refs/tags/
$pkgver
.tar.gz
$pkgname
.initd
$pkgname
.confd
"
...
...
@@ -44,17 +44,17 @@ package() {
mkdir
-p
"
$pkgdir
/usr/share/doc/
$pkgname
"
cat
>
$pkgdir
/usr/share/doc/
$pkgname
/README.alpine
<<
EOF
TinySSH can be run in 3 different ways:
--------------------------------------
--------------------------------------
-
(1) /etc/init.d/tinysshd (requires tcpserver & takes care of key generation)
(2) via
inetd
(you will need to 'tinysshd-makekeys <dir>' manually):
(2) via
busybox
(you will need to 'tinysshd-makekeys <dir>' manually):
echo '22 stream tcp nowait root /usr/sbin/tinysshd tinysshd -l -v /etc/tinyssh/sshkeys' >> /etc/inetd.conf
rc-service inetd start
busybox tcpsvd 0.0.0.0 22 tinysshd -v /etc/tinyssh/sshkeys &
(3)
Using runit with either (1) or (2)
(3)
via inetd (you will need to 'tinysshd-makekeys <dir>' manually):
Stealth SSH with FWKNOP: https://it-offshore.co.uk/security/53-stealth-your-ssh-port-ssh-into-lxc-containers
echo '22 stream tcp nowait root /usr/sbin/tinysshd tinysshd -l -v /etc/tinyssh/sshkeys' >> /etc/inetd.conf
rc-service inetd start
EOF
}
...
...
@@ -65,6 +65,6 @@ openrc() {
sha512sums
=
"
b48561cfc11bb6d2e9b1c805c9dfc36be5f1bbbf04a455b8db3f02b5b8df15e420fcd93d58fb23526baaf0fd70e9969deca261152a656015f12a433a61092e90 tinyssh-20240101.tar.gz
d25f2d80f360528aaf7956ef6d257b09692c22de10e70c7eed132253c3903297269ff60f948f57a587fcd677fa9207b59715c54f257a777c95cc497570d21b56
tinyssh.initd
ee3b43f86239825daf320853c6da1f289e11e66ab8fc69ff181327dffcd71a5e8f10e151f717b5a8c65befaf89fea49e75ca0e78cd57b6d3868e2ac0ee258d94
tinyssh.initd
7c6282a6ae972d83d3e624530cac4958adee1e2313d0e44aff38c94bde1a3f549a536ec80e594d44c29a6a981919dd30322e8d8511626fdb6493c98587047392 tinyssh.confd
"
This diff is collapsed.
Click to expand it.
community/tinyssh/tinyssh.initd
+
7
−
18
View file @
06016037
...
...
@@ -3,6 +3,7 @@
# Copyright 2017 Stuart Cardall (https://github.com/itoffshore)
# Distributed under the terms of the GNU General Public License, v2 or later #
# Modified by Laurent Bercot <ska-devel@skarnet.org> 2021-12-07
# Modified by Miguel Da Silva <midas@contauro.com> 2024-04-04
OPTIONS
=
${
OPTIONS
:-
\-v -l
}
PORT
=
${
PORT
:-
22
}
...
...
@@ -15,28 +16,16 @@ depend() {
after logger firewall
}
name
=
tinysshd
daemon
=
tinysshd
supervisor
=
supervise-daemon
description
=
"Small SSH server using libsodium (no dependency on OpenSSL)"
command
=
"s6-tcpserver"
command_args
=
"
${
IP
}
${
PORT
}
$name
${
OPTIONS
}
$keydir
"
command_background
=
true
pidfile
=
/var/run/tinysshd.pid
command
=
"tcpserver"
command_args
=
"-HRDl0
${
IP
}
${
PORT
}
$daemon
${
OPTIONS
}
$keydir
"
start_pre
()
{
if
!
[
-d
"
$keydir
"
]
;
then
checkpath
-
D
${
CONFDIR
}
checkpath
-
-directory
${
CONFDIR
}
tinysshd-makekey
$keydir
2>/dev/null
fi
}
stop_post
()
{
if
[
"
$RC_RUNLEVEL
"
=
"shutdown"
]
;
then
local
_tinysshd_pids
=
$(
pgrep tinysshd
)
if
[
-n
"
$_tinysshd_pids
"
]
;
then
ebegin
"Shutting down ssh connections"
# shellcheck disable=SC2086
kill
-TERM
$_tinysshd_pids
>
/dev/null 2>&1
eend 0
fi
fi
}
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