I have set up an ssh server using Apache MINA sshd for SFTP. I want to enable server authentication so clients cannot be spoofed. In the documentation page all it says is to use the following method (Apache MINA sshd doc):
sshd.setKeyPairProvider(new SimpleGeneratorHostKeyProvider("hostkey.ser"));
But as I understand, that generates a keypair on its own. What if I want to use an existing certificate file for this server?