SSH key worked successfully if I connect manually but bamboo process failed with the message Exhausted available authentication methods.
Would you have any suggestions where to check?
Hello @Kai Sookwongse
Welcome to Atlassian Community!
Can you provide us with a bit of context about what you are trying to achieve so we can assist you?
Cheers,
Eduardo AlvarengaAtlassian Support APAC
--please don't forget to Accept the answer if the reply is helpful--
SSH was setup and tested by logging on to the source server (running Bamboo) and SSH to target server. The test was successful.
Using deployment scrip from Bamboo server, using same account and SSH key, got error
07-Jun-2023 17:23:33 Connecting to 10.30.0.21 on port: 22
07-Jun-2023 17:23:33 Failed to connect to host07-Jun-2023 17:23:33 net.schmizz.sshj.userauth.UserAuthException: Exhausted available authentication methods07-Jun-2023 17:23:33 at net.schmizz.sshj.SSHClient.auth(SSHClient.java:230)07-Jun-2023 17:23:33 at net.schmizz.sshj.SSHClient.authPublickey(SSHClient.java:345)07-Jun-2023 17:23:33 at com.atlassian.bamboo.plugins.scp.SshTask.execute(SshTask.java:103)
The same Bamboo deployment process worked to different target server with the same SSH private and public key.
Bamboo does not use the OpenSSH client to connect to the target host. Instead, it uses the sshj java library. If you are using an old Bamboo version, sshj may not support the authentication methods offered by modern SSH servers.
Either upgrade Bamboo to a recent release (9.3) or try adding something like this to your SSH server configuration file (usually /etc/ssh/sshd_config) and restart the service:
KexAlgorithms +diffie-hellman-group1-sha1
It may also be the case of something going on with your OpenSSH Server. For that, you will have to debug that service outside of Bamboo to figure out why it is rejecting the connection. I suggest you compare the OpenSSH version and configuration from the server that works with the one that doesn't.
It looks like you're new here. Sign in or register to get started.