title: Remote connection to SQL Server with FreeTDS and IPv6
body: <p>I am trying to connect to a remote SQL Server 2008 from a bash file in a Ubuntu 14.04. I am using FreeTDS and the <code>tsql</code> command to do so. </p>
  
  <p>When I am in the same network as the SQL Server, I can access it using its local ip <code>192.168.0.2</code>, using the following command:</p>
  
  <pre><code>tsql -S 192.168.0.2 -U &lt;user&gt; -P &lt;password&gt; 
  </code></pre>
  
  <p>The problem is when I try to connect using an IPv6. tsql doesn't seem to recognize the IPv6 I got. Here is what I get when trying to connect (the ip is anonymized):</p>
  
  <pre><code>tsql -S fe80::c74a:ada5:be2e:255f%11 
  </code></pre>
  
  <p>Here is the result:</p>
  
  <blockquote>
    <p>Error 20012 (severity 2):<br>
    Server name not found in configuration files.<br>
    locale is "en_US.UTF-8"<br>
    locale charset is "UTF-8"<br>
    using default charset "UTF-8"<br>
    Error 20013 (severity 2):<br>
    Unknown host machine name.<br>
    There was a problem connecting to the server</p>
  </blockquote>
  
  <p>What am I doing wrong here? Any help is appreciated</p>