mirror of
https://github.com/bytedream/docker4ssh.git
synced 2025-05-11 05:05:10 +02:00
Fixed ssh key generation issue (#1)
This commit is contained in:
parent
9f29b1b8dd
commit
f3e032cf54
6
Makefile
6
Makefile
@ -17,15 +17,15 @@ build-container:
|
|||||||
fi
|
fi
|
||||||
cp -rf $(_BUILDDIR)/x86_64-unknown-linux-musl/$(shell if $(DEBUG); then echo debug; else echo release; fi)/configure $(_BUILDDIR)
|
cp -rf $(_BUILDDIR)/x86_64-unknown-linux-musl/$(shell if $(DEBUG); then echo debug; else echo release; fi)/configure $(_BUILDDIR)
|
||||||
|
|
||||||
build-extra: SSHPASS:=$(shell LC_ALL=C tr -dc 'A-Za-z0-9!#$%&()*,-./:<=>?@[\]^_{}~' < /dev/urandom | head -c 18 ; echo)
|
build-extra: SSHPASS:=$(shell LC_ALL=C tr -dc 'A-Za-z0-9!#$%&()*,-.:<=>?@[]^_{}~' < /dev/urandom | head -c 18 ; echo)
|
||||||
build-extra:
|
build-extra:
|
||||||
if [ "$(_BUILDDIR)" != "$(shell realpath .)/" ]; then\
|
@if [ "$(_BUILDDIR)" != "$(shell realpath .)/" ]; then\
|
||||||
cp -rf LICENSE $(_BUILDDIR)/LICENSE;\
|
cp -rf LICENSE $(_BUILDDIR)/LICENSE;\
|
||||||
cp -rf man/ $(_BUILDDIR);\
|
cp -rf man/ $(_BUILDDIR);\
|
||||||
fi
|
fi
|
||||||
yes | ssh-keygen -t ed25519 -f $(_BUILDDIR)/docker4ssh.key -N "$(SSHPASS)" -b 4096 > /dev/null
|
yes | ssh-keygen -t ed25519 -f $(_BUILDDIR)/docker4ssh.key -N "$(SSHPASS)" -b 4096 > /dev/null
|
||||||
cp -rf extra/docker4ssh.conf $(_BUILDDIR)
|
cp -rf extra/docker4ssh.conf $(_BUILDDIR)
|
||||||
sed -i 's|Passphrase = ""|Passphrase = "$(SSHPASS)"|' $(_BUILDDIR)/docker4ssh.conf
|
sed -i "s|Passphrase = \"\"|Passphrase = \"$(SSHPASS)\"|" $(_BUILDDIR)/docker4ssh.conf
|
||||||
cat extra/database.sql | sqlite3 $(_BUILDDIR)/docker4ssh.sqlite3
|
cat extra/database.sql | sqlite3 $(_BUILDDIR)/docker4ssh.sqlite3
|
||||||
mkdir -p $(_BUILDDIR)/profile/ && cp -f extra/profile.conf $(_BUILDDIR)/profile/
|
mkdir -p $(_BUILDDIR)/profile/ && cp -f extra/profile.conf $(_BUILDDIR)/profile/
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user