3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/nixos/modules/services/networking
Daniel Fullmer ad38a2a646 nixos/ssh: remove empty host key files before generating new ones
In a previous PR [1], the conditional to generate a new host key file
was changed to also include the case when the file exists, but has zero
size. This could occur when the system is uncleanly powered off shortly
after first boot.

However, ssh-keygen prompts the user before overwriting a file. For
example:

$ touch hi
$ ssh-keygen -f hi
Generating public/private rsa key pair.
hi already exists.
Overwrite (y/n)?

So, lets just try to remove the empty file (if it exists) before running
ssh-keygen.

[1] https://github.com/NixOS/nixpkgs/pull/141258
2022-05-03 22:09:43 -07:00
..
hylafax
icecream
ircd-hybrid
iscsi
jibri
keepalived
nghttpx
ntp
ssh
strongswan-swanctl
znc
3proxy.nix
adguardhome.nix
amuled.nix
antennas.nix
aria2.nix
asterisk.nix
atftpd.nix
autossh.nix
avahi-daemon.nix
babeld.nix
bee-clef.nix
bee.nix
biboumi.nix
bind.nix
bird.nix
bitcoind.nix
bitlbee.nix
blockbook-frontend.nix
blocky.nix
charybdis.nix
cjdns.nix
cloudflare-dyndns.nix
cntlm.nix
connman.nix
consul.nix
coredns.nix
corerad.nix
coturn.nix
create_ap.nix
croc.nix
dante.nix
ddclient.nix
dhcpcd.nix
dhcpd.nix
dnscache.nix
dnscrypt-proxy2.nix
dnscrypt-wrapper.nix
dnsdist.nix
dnsmasq.nix
doh-proxy-rust.nix
ejabberd.nix
envoy.nix
epmd.nix
ergo.nix
ergochat.nix
eternal-terminal.nix
fakeroute.nix
ferm.nix
fireqos.nix
firewall.nix
flannel.nix
freenet.nix
freeradius.nix
frr.nix
gateone.nix
gdomap.nix
ghostunnel.nix
git-daemon.nix
globalprotect-vpn.nix
gnunet.nix
go-neb.nix
go-shadowsocks2.nix
gobgpd.nix
gvpe.nix
hans.nix
haproxy.nix
headscale.nix
helpers.nix
hostapd.nix
htpdate.nix
https-dns-proxy.nix
i2p.nix
i2pd.nix
inspircd.nix
iodine.nix
iperf3.nix
iwd.nix
jicofo.nix
jitsi-videobridge.nix
kea.nix
keybase.nix
knot.nix
kresd.nix
lambdabot.nix
libreswan.nix
lldpd.nix
logmein-hamachi.nix
lxd-image-server.nix
magic-wormhole-mailbox-server.nix
matterbridge.nix
minidlna.nix
miniupnpd.nix
miredo.nix
mjpg-streamer.nix
monero.nix
morty.nix
mosquitto.md
mosquitto.nix
mosquitto.xml
mozillavpn.nix
mstpd.nix
mtprotoproxy.nix
mtr-exporter.nix
mullvad-vpn.nix
multipath.nix
murmur.nix
mxisd.nix
namecoind.nix
nar-serve.nix
nat.nix
nats.nix
nbd.nix
ncdns.nix
ndppd.nix
nebula.nix
networkmanager.nix
nextdns.nix
nftables.nix
ngircd.nix
nix-serve.nix
nix-store-gcs-proxy.nix
nixops-dns.nix
nntp-proxy.nix
nomad.nix
nsd.nix
ntopng.nix
nullidentdmod.nix
nylon.nix
ocserv.nix
ofono.nix
oidentd.nix
onedrive.nix
onedrive.xml
openconnect.nix
openvpn.nix
ostinato.nix
owamp.nix
pdns-recursor.nix
pdnsd.nix
pixiecore.nix
pleroma.nix
pleroma.xml
polipo.nix
powerdns.nix
pppd.nix
pptpd.nix
prayer.nix nixos/prayer: Add port type 2021-01-31 12:01:41 +01:00
privoxy.nix
prosody.nix
prosody.xml
quassel.nix
quicktun.nix
quorum.nix
radicale.nix
radvd.nix
rdnssd.nix
redsocks.nix
resilio.nix
robustirc-bridge.nix
rpcbind.nix
rxe.nix
sabnzbd.nix
seafile.nix
searx.nix
shadowsocks.nix
shairport-sync.nix
shellhub-agent.nix
shorewall.nix
shorewall6.nix
shout.nix
skydns.nix
smartdns.nix
smokeping.nix
sniproxy.nix
snowflake-proxy.nix
softether.nix
soju.nix
solanum.nix
spacecookie.nix
spiped.nix
squid.nix
sslh.nix
strongswan.nix
stubby.nix
stunnel.nix
supplicant.nix
supybot.nix
syncplay.nix
syncthing-relay.nix
syncthing.nix
tailscale.nix
tcpcrypt.nix
teamspeak3.nix
tedicross.nix
teleport.nix
tetrd.nix
tftpd.nix
thelounge.nix
tinc.nix nixos/tinc: add mic92 maintainer 2022-01-05 19:29:01 +01:00
tinydns.nix
tox-bootstrapd.nix
tox-node.nix
toxvpn.nix
trickster.nix
tvheadend.nix
ucarp.nix
unbound.nix
unifi.nix
v2ray.nix
vsftpd.nix
wasabibackend.nix
websockify.nix
wg-netmanager.nix
wg-quick.nix
wireguard.nix
wpa_supplicant.nix
x2goserver.nix
xandikos.nix
xinetd.nix
xl2tpd.nix
xrdp.nix
yggdrasil.nix
yggdrasil.xml
zerobin.nix
zeronet.nix
zerotierone.nix