title: Postgresql connection via terminal - pgadmin
body: <p>I have a problem connecting (using SSH) to my virtualbox(ubuntu) postgres server.
  I set up all nice and correctly.</p>
  
  <p>PostgreSQL settings:</p>
  
  <ul>
  <li><code>postgresql.conf</code> -> Allowed all incomming connection (*) and set ssl TRUE</li>
  <li><code>pg_hba.con</code>f -> after a lot of changes i came to the point where it seems to work with this settings:</li>
  </ul>
  
  <p>IP4</p>
  
  <pre><code>host all all 0.0.0.0/0 trust
  hostssl all all 0.0.0.0/0 trust
  host all all 192.168.x.x/32 trust 
  hostssl all all 192.168.x.x/32 trust 
  </code></pre>
  
  <p>I tried:</p>
  
  <ol>
  <li><p>Made restart of my postgres server on the virtual machine.</p></li>
  <li><p>Then i went to my host machine (Snow Leopard), build a ssh connection to the virtualbox (ubuntu) and it's working.</p></li>
  <li><p>ping my guest machine on port 5432 also works.</p></li>
  <li><p>Open pgadmin on my host machine (Snow Leopard) -> added server 192.68.56.1 and database <code>pluto</code>, user <code>pippo</code>. The connection worked and i see the DB.</p></li>
  <li><p>Tried open TERMINAL in Snow Leopard and executed following cmd:</p>
  
  <pre><code>psql -h 192.168.56.1 -U pippo -d pluto
  </code></pre>
  
  <p>with ERROR:</p>
  
  <pre><code>psql: FATAL:  no pg_hba.conf entry for host "192.168.56.1", 
                user "pippo", database "pluto", SSL off
  </code></pre></li>
  </ol>
  
  <p>I also tried to connect through my Java Program ans I got the same error.<br>
  What am I doing wrong? </p>