Erlang ssh connection error: Unable to connect usi

2019-09-10 04:53发布

问题:

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


标签: erlang elixir