throw die("Cannot create directory " + tmpdir);
}
chmod(0600, tmpdir);
final File tmpkey = new File(tmpdir, site.ssh_key.getName());
final SimpleGeneratorHostKeyProvider p;
System.err.print(" rsa(simple)...");
System.err.flush();
p = new SimpleGeneratorHostKeyProvider();
p.setPath(tmpkey.getAbsolutePath());
p.setAlgorithm("RSA");
p.loadKeys(); // forces the key to generate.
chmod(0600, tmpkey);
if (!tmpkey.renameTo(site.ssh_key)) {
throw die("Cannot rename " + tmpkey + " to " + site.ssh_key);
}