title: Not able to connect to a remote SSH server with Elixir
body: <p>I have been trying for a while to connect to a remote ssh server with elixir.</p>
  
  <p>This is what I do in IEX:</p>
  
  <pre><code>[Macintosh] elixir/logglycious (master|…)&gt; iex                                                                            15-07-20 0:11
  Erlang/OTP 17 [erts-6.4] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]
  
  Interactive Elixir (1.0.4) - press Ctrl+C to exit (type h() ENTER for help)
  iex(1)&gt; :application.start(:crypto)
  {:error, {:already_started, :crypto}}
  iex(2)&gt; :application.start(:public_key)
  {:error, {:not_started, :asn1}}
  iex(3)&gt; :application.start(:asn1)
  :ok
  iex(4)&gt; :application.start(:public_key)
  :ok
  iex(5)&gt; :application.start(:ssl)
  :ok
  iex(6)&gt; :application.start(:ssh)
  :ok
  iex(7)&gt; :ssh.connect("my.server.co.uk", 22, [ { :user, 'my_username' } ])
  {:error, {:options, {:socket_options, [:inet]}}}
  iex(8)&gt;
  </code></pre>
  
  <p>First of all, I must say this error message is not helping at all. I received great support from the community on Slack though. Someone suggested to start the inets application too. I did and retried to connect but I got the same error again.</p>
  
  <p>What am I doing wrong ? More importantly, how can I find the solution to such a problem next time ?</p>
  
  <p>[FIXED] There were multiple issues. First the server must be provided between single quotes. Then make sure that your public key does not require a passphrase. If it does, it can be passed as an option to the connect function. Also, it is not necessary to start all the applications I started. <code>:ssh.start</code>is the only one I needed.</p>