SSHJ - Keypair login to EC2 instance

前端 未结 3 2265
無奈伤痛
無奈伤痛 2020-12-03 12:59

I have a pem file that looks like the one in SSHJ tests (though I don\'t see it being referenced): https://github.com/shikhar/sshj/blob/master/src/test/resources/hostkey.pem

3条回答
  •  无人及你
    2020-12-03 13:02

    It's not the user authentication that's tripping you, it's the host key verification :)

    Something like client.addHostKeyVerifier("xx:0a:xx:b5:c2:fd:44:1d:e0:e4:fc:xx:5f:f8:dd:f6") before connecting.

提交回复
热议问题