Ubuntu – Public key authentication fails with JSch but work with OpenSSH with the same key
I'm trying to establish an SSH connection using Kotlin + JSch, but it fails with com.jcraft.jsch.jSchException: Auth fail Steps taken: Generate SSH key pair using ssh-keygen -t rsa -m PEM (OpenSSH version: OpenSSH_8.2p1) Append contents of generated id_rsa.pub to /home/username/.ssh/authorized_keys…