Commit 5ff25566 authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Host keys should be generated on startup to be different on different instances

parent 5f173874
......@@ -13,6 +13,7 @@ all: sshd-service
cd openssh-8.3p1 && install -v -m644 contrib/ssh-copy-id.1 /usr/share/man/man1
install -v -m755 -d /usr/share/doc/openssh-8.3p1
cd openssh-8.3p1 && install -v -m644 INSTALL LICENCE OVERVIEW README* /usr/share/doc/openssh-8.3p1
rm /etc/ssh/*_key /etc/ssh/*_key.pub
@echo "$$SSHD_SERVICE" > /lib/systemd/system/sshd.service
ln -s /lib/systemd/system/sshd.service /etc/systemd/system/multi-user.target.wants/sshd.service
sed -i 's/#PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config
......@@ -25,6 +26,7 @@ define SSHD_SERVICE
Description=OpenSSH Daemon
[Service]
ExecStartPre=/usr/bin/ssh-keygen -A
ExecStart=/usr/sbin/sshd -D
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment