InitSshd: Check if the ssh_host file exists with the other keys
Change-Id: Id7e6d76283b2cf2a6748acf4205d5e9152389feb
This commit is contained in:

committed by
David Pursehouse

parent
aadfbd9a3f
commit
2efae69569
@@ -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)
|
||||
if (!exists(site.ssh_key)
|
||||
&& (!exists(site.ssh_rsa)
|
||||
|| !exists(site.ssh_dsa)
|
||||
|| !exists(site.ssh_ed25519)
|
||||
|| !exists(site.ssh_ecdsa)) {
|
||||
|| !exists(site.ssh_ecdsa))) {
|
||||
System.err.print("Generating SSH host key ...");
|
||||
System.err.flush();
|
||||
|
||||
|
Reference in New Issue
Block a user