Elixir Phoenix SSH

From ElixirBlocks
Revision as of 15:15, 9 June 2024 by Admin (talk | contribs) (Created page with "These are ways to SSH into a server using Elixir/Phoenix. Using the librarian library you can do this: <source> SSH.connect!("test.laptop.local", username: "username", password: "passs", silently_accept_hosts: true) </source> If server has a private key: <source> SSH.connect( "server.host", user: "server.user", port: "server.port", identity: "identity path eg: ~/.ssh/id_rsa_nop", save_accepted_host: false, silen...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

These are ways to SSH into a server using Elixir/Phoenix. Using the librarian library you can do this:



SSH.connect!("test.laptop.local", username: "username", password: "passs", silently_accept_hosts: true)


If server has a private key:

      SSH.connect(
        "server.host",
        user: "server.user",
        port: "server.port",
        identity: "identity path eg: ~/.ssh/id_rsa_nop",
        save_accepted_host: false,
        silently_accept_hosts: true,
        user_interaction: false
      )