Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

SSH connection to target failed. Message 'Exhausted available authentication methods'

Kai Sookwongse June 7, 2023

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?

 

1 answer

1 accepted

1 vote
Answer accepted
Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 7, 2023

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-- 

Kai Sookwongse June 8, 2023

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)

Kai Sookwongse June 8, 2023

The same Bamboo deployment process worked to different target server with the same SSH private and public key.

Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 8, 2023

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-- 

Like # people like this
Kai Sookwongse June 9, 2023

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events