问题
When doing an ssh connection in Elixir, I got this error:
:ssh.shell('host address', port_number, user: 'user_name')
{:error, 'Unable to connect using the available authentication methods'}
回答1:
The answer was in a comment left by @svarlet on this question.
If your ssh key has a pass-phrase, you need to specify it in the options to the Erlang ssh connect command.
:ssh.shell('host address', port_number, user: 'user_name', rsa_pass_phrase: 'ssh_key_passphrase')
来源:https://stackoverflow.com/questions/37831250/erlang-ssh-connection-error-unable-to-connect-using-the-available-authenticatio