if (serverKeyPath != null) {
log.log(Level.FINE, "Found server key path " + serverKeyPath);
File f = new File(serverKeyPath);
String keyGen = getContext().getProperty(SSH_SERVER_KEYGEN);
if (keyGen != null && keyGen.equals("true")) {
keyPairProvider = new PEMGeneratorHostKeyProvider(serverKeyPath, "RSA");
} else if (f.exists() && f.isFile()) {
try {
serverKeyURL = f.toURI().toURL();
serverKey = new Resource("hostkey.pem", serverKeyURL);
} catch (MalformedURLException e) {