diff --git a/src/main/java/com/hierynomus/sshj/userauth/keyprovider/OpenSSHKeyV1KeyFile.java b/src/main/java/com/hierynomus/sshj/userauth/keyprovider/OpenSSHKeyV1KeyFile.java index ba91512e..04de5b40 100644 --- a/src/main/java/com/hierynomus/sshj/userauth/keyprovider/OpenSSHKeyV1KeyFile.java +++ b/src/main/java/com/hierynomus/sshj/userauth/keyprovider/OpenSSHKeyV1KeyFile.java @@ -84,6 +84,12 @@ public class OpenSSHKeyV1KeyFile extends BaseFileKeyProvider { private PublicKey pubKey; + @Override + public PublicKey getPublic() + throws IOException { + return pubKey != null ? pubKey : super.getPublic(); + } + public static class Factory implements net.schmizz.sshj.common.Factory.Named {