Unable to connect using the available authentication

I’m using SftpEx to connect via SFTP with a remote server, the script works fine on my pc (Ubuntu 20.04) but at my Raspberry PI (Raspbian 10 buster) the following message appears:

SftpEx.connect(host: '<host>', user: '<user>', port: <port>)

Erlang SSH :client 4.8 (OpenSSL 1.1.1d 10 Sep 2019).
Server: 'SSH-2.0-OpenSSH_7.4'
Disconnects with code = 14 [RFC4253 11.1]: Unable to connect using the available authentication methods
State = {userauth, client}
Module = ssh_connection_handler, Line = 904
  User auth failed for: '<user>'

While searching the common awnser was the ssh key and pass_phrase.
But my key doesn’t have any pass_phrase and it’s named properly (~/.ssh/id_rsa). To verify the connection, I tested the command line ssh and sftp and both works just fine.

I would like to know if anyone can help me to fix this connection issue. Thank you

This is my first question at this forum so let me know if I broke any format rule.

How do you run the script?

Now testing, I’am running in interactive mode using iex -S mix.
The rest of the code works but the sftp connection fails, so to test I run the above command (SftpEx.connect…) at iex and produces the same error

How have you transfered that project to your raspberry? If you just copied the projects folder recursively, have you forced recompilation via rm -rfv _build deps; mix deps.get; mix compile, or are you using artifacts build on your Ubuntu?

How have you installed erlang and elixir on both systems?

It was with git clone from my rep in github. I’ll verify if any error occured.

At raspberry:
Erlang/OTP 22 [erts-10.5.4]
Elixir 1.10.3

At ubuntu:
Erlang/OTP 23 [erts-11.0.2]
Elixir 1.10.3

I used mix deps.get

Yes, but how did you install them?

From the commands given in elixir install page https://elixir-lang.org/install.html