File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
server/src/main/java/com/cloud/server Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -617,7 +617,9 @@ public void updateKeyPairs() {
617617 // FIXME: take a global database lock here for safety.
618618 boolean onWindows = isOnWindows ();
619619 if (!onWindows ) {
620- Script .runSimpleBashScript ("if [ -f " + privkeyfile + " ]; then rm -f " + privkeyfile + "; fi; ssh-keygen -t ecdsa -m PEM -N '' -f " + privkeyfile + " -q 2>/dev/null || ssh-keygen -t ecdsa -N '' -f " + privkeyfile + " -q" );
620+ if (!privkeyfile .exists () && !pubkeyfile .exists ()) {
621+ Script .runSimpleBashScript ("if [ -f " + privkeyfile + " ]; then rm -f " + privkeyfile + "; fi; ssh-keygen -t ecdsa -m PEM -N '' -f " + privkeyfile + " -q 2>/dev/null || ssh-keygen -t ecdsa -N '' -f " + privkeyfile + " -q" );
622+ }
621623 }
622624
623625 final String privateKey ;
You can’t perform that action at this time.
0 commit comments