jaimeiniesta
Setting PubkeyAuthentication=no in SFTP connection
Hello! I’m using the sftp_ex library (which is a wrapper around Erlang SFTP) and there’s a server I want to connect to that will not accept pub key authentication, in such an strict way that even when I’m passing user and password, it will reject the connection if a pub key is also passed in.
When using sftp directly, I can pass the -o PubkeyAuthentication=no option to avoid including the pub key, but I haven’t found how to do that in Elixir / Erlang.
A workaround is setting user_dir to point to an existing directory that doesn’t contain any pub keys, for example /tmp, this way it looks there and as it doesn’t find any, none is passed and the connection is accepted.
Do you know a way to set the PubkeyAuthentication=no when connecting via Erlang SFTP?
Most Liked
LostKobrakai
Given my limited experience with the module this seems to be “the way” and not a workaround. I was looking into passing private keys I have in memory, but it seems “having a folder of keys” is the expected way to handle them.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #hex
- #security









