InitSshd: Check if the ssh_host file exists with the other keys

Change-Id: Id7e6d76283b2cf2a6748acf4205d5e9152389feb
This commit is contained in:
Paladox none
2017-05-08 08:25:54 +00:00
committed by David Pursehouse
parent aadfbd9a3f
commit 2efae69569

View File

@@ -80,9 +80,11 @@ class InitSshd implements InitStep {
}
private void generateSshHostKeys() throws InterruptedException, IOException {
if (!exists(site.ssh_key) && !exists(site.ssh_rsa) && !exists(site.ssh_dsa)
|| !exists(site.ssh_ed25519)
|| !exists(site.ssh_ecdsa)) {
if (!exists(site.ssh_key)
&& (!exists(site.ssh_rsa)
|| !exists(site.ssh_dsa)
|| !exists(site.ssh_ed25519)
|| !exists(site.ssh_ecdsa))) {
System.err.print("Generating SSH host key ...");
System.err.flush();