Class SshKeyGenerator
java.lang.Object
com.sshtools.j2ssh.transport.publickey.SshKeyGenerator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidchangePassphrase(File f, String oldPassphrase, String newPassphrase) static StringconvertPublicKeyFile(File f, SshPublicKeyFormat convert) voidgenerateKeyPair(String type, int bits, String filename, String username, String passphrase) static voidstatic voidprocessCommandLine(String[] args)
-
Constructor Details
-
SshKeyGenerator
public SshKeyGenerator()Creates a new SshKeyGenerator object.
-
-
Method Details
-
generateKeyPair
public void generateKeyPair(String type, int bits, String filename, String username, String passphrase) throws IOException - Parameters:
type-bits-filename-username-passphrase-- Throws:
IOException
-
main
- Parameters:
args-
-
processCommandLine
- Parameters:
args-
-
changePassphrase
public static void changePassphrase(File f, String oldPassphrase, String newPassphrase) throws IOException, InvalidSshKeyException - Parameters:
f-oldPassphrase-newPassphrase-- Throws:
IOExceptionInvalidSshKeyException
-
convertPublicKeyFile
public static String convertPublicKeyFile(File f, SshPublicKeyFormat convert) throws InvalidSshKeyException, IOException - Parameters:
f-convert-- Returns:
- Throws:
InvalidSshKeyExceptionIOException
-