diff --git a/nucleus/cluster/ssh/src/main/java/org/glassfish/cluster/ssh/launcher/SSHLauncher.java b/nucleus/cluster/ssh/src/main/java/org/glassfish/cluster/ssh/launcher/SSHLauncher.java index 6f16daffa14..e966bd905e9 100644 --- a/nucleus/cluster/ssh/src/main/java/org/glassfish/cluster/ssh/launcher/SSHLauncher.java +++ b/nucleus/cluster/ssh/src/main/java/org/glassfish/cluster/ssh/launcher/SSHLauncher.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation + * Copyright (c) 2022, 2024 Contributors to the Eclipse Foundation * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -142,7 +142,7 @@ public void init(Node node, Logger logger) { String userName = null; if (sshAuth != null) { userName = sshAuth.getUserName(); - this.keyFile = new File(sshAuth.getKeyfile()); + this.keyFile = sshAuth.getKeyfile() == null ? null : new File(sshAuth.getKeyfile()); this.rawPassword = sshAuth.getPassword(); this.rawKeyPassPhrase = sshAuth.getKeyPassphrase(); }