Q:

Erlang ssh_sftp returns eoptions password, what does this error mean?

My code is pretty simple right now, I'm calling erlang from elixir.
iex> :ssh.start()
iex> :ssh_sftp.start_channel("192.168.1.183", 22, [{:user, "username"}, {:password, "password"}])

:ssh.start() returns :ok, but :ssh_sftp.start_channel returns {:error, {:eoptions, {:password, "password"}}}. If I remove the password tuple, it then complains about the user tuple. This makes me thing that I'm fundamentally misunderstanding the erlang documentation. I'd like some help understanding what I'm doing wrong. The ssh_sftp documentation is at ssh_sftp

A:

{:eoptions, _} is returned when an option passed contains a value of invalid type. You're getting this error because :password must be a list (Erlang String or Elixir charlist). :user and the hostname must also be charlists. The following should work:
:ssh_sftp.start_channel('192.168.1.183', 22, [{:user, 'username'}, {:password, 'password'}])

This makes me thing that I'm fundamentally misunderstanding the erlang documentation.

Double quoted strings in Erlang are lists of characters, not binaries. If you see double quoted strings in Erlang code, you need to use single quoted strings in Elixir instead.

