title: Can't establish Postgres pgAdmin SSH tunnel on Ubuntu
body: <p>I have a droplet on DigitalCloud with Ubuntu 14.04 and PostgreSQL 9.3. On local machine i have the same configuration.</p>
  
  <p>My ssh connection is working so there is no problem with it. It must be somewhere in my Postgres connection or environment settings.</p>
  
  <p>So what i have already done on the server is:</p>
  
  <ul>
  <li><p>changed the listening port in <em>/etc/ssh/sshd_config</em></p>
  
  <p>Port 4321</p></li>
  <li><p>enabled remote connections in <em>/etc/postgresql/9.3/main/pg_hba.conf</em></p>
  
  <p>host    all     all     0.0.0.0/0   md5</p></li>
  <li><p>added listening addresses in <em>/etc/postgresql/9.3/main/postgresql.conf</em></p>
  
  <p>listen_addresses = '*'</p></li>
  </ul>
  
  <p>And here is my local connection settings:</p>
  
  <p><a href="http://i.stack.imgur.com/n5AVu.jpg" rel="nofollow">Here is my Properties tab screen</a></p>
  
  <p><a href="http://i.stack.imgur.com/c3O4X.jpg" rel="nofollow">Here is my SSH Tunnel tab screen</a> </p>
  
  <p>I use just the same (and only) id_rsa.pub file which i used to establish my ssh connection before. Which is working. And this is an error that i get upon trying to connect:</p>
  
  <blockquote>
    <p>SSH error: Authentication by identify file failed with error code -16
    [Unable to extract public key from private key file: Wrong passphrase
    or invalid/unrecognized private key file format]</p>
  </blockquote>
  
  <p>My passphrase was set to empty.</p>
  
  <p>If i try to connect without SSH tunnel there is another error:</p>
  
  <blockquote>
    <p>Error connecting to the server: SSL error: unknown protocol expected
    authentication request from server, but received S</p>
  </blockquote>
  
  <p>I'm a complete newbie to it and I may have missed something important. So tell me if you want me to provide any other info on this matter.</p>
  
  <p><strong>EDIT 1:</strong></p>
  
  <p>If i use correct id_rsa file (without pub) then i get this same error:</p>
  
  <blockquote>
    <p>Error connecting to the server: SSL error: unknown protocol expected
    authentication request from server, but received S</p>
  </blockquote>