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 Alvarenga
Atlassian 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 host
07-Jun-2023 17:23:33 net.schmizz.sshj.userauth.UserAuthException: Exhausted available authentication methods
07-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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The same Bamboo deployment process worked to different target server with the same SSH private and public key.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Kai Sookwongse
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.
Eduardo Alvarenga
Atlassian Support APAC
--please don't forget to Accept the answer if the reply is helpful--
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you. We have made the change and added the algorithms as suggested. Bamboo was able to connect to the target servers now. Thank you for your support.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.