title: ssh key not working on linux hosting
body: <p>I'm trying to use an ssh key with git on my linux hosting service.</p>
  
  <p>I did check a ton of guides but none seems to work for me, so maybe some human help will.</p>
  
  <p>This is what i've done:</p>
  
  <ul>
  <li><p>I have already a keypair on my mac with a public and private key</p></li>
  <li><p>I have added this public key to bitbucket</p></li>
  <li><p>If (from the mac) i type in ssh -T git@bitbucket.org it asks for the psw and the it says i'm logged in, which means it is working and the keys are correct</p></li>
  </ul>
  
  <p>Now, on the linux server host:</p>
  
  <ul>
  <li>I go to ~/.ssh/ and in here i have this files:</li>
  </ul>
  
  <blockquote>
    <p>authorized_keys -> /etc/support.pub (i cannot access this because
    of host limitations)</p>
    
    <p>authorized_keys2 -> with my public id_rsa (format: id_rsa #######)</p>
    
    <p>id_rsa -> my public key (format: id_rsa #######)</p>
  </blockquote>
  
  <p>I also created a file called config which looks like this:</p>
  
  <p>Host bitbucket.com-{username}
       HostName bitbucket.com
       User git
       IdentityFile ~/.ssh/id_rsa.pub</p>
  
  <p>but when i type: <code>ssh -T git@bitbucket.org</code></p>
  
  <p>i get this error: <code>Permission denied (publickey).</code></p>
  
  <p>the verbose log shows this:</p>
  
  <pre><code>debug1: Reading configuration data /home/user/.ssh/config
  debug1: Reading configuration data /etc/ssh/ssh_config
  debug1: /etc/ssh/ssh_config line 3: Applying options for *
  debug1: Connecting to bitbucket.org [104.......] port 22.
  debug1: Connection established.
  debug1: identity file /home/user/.ssh/id_rsa type 1
  debug1: identity file /home/user/.ssh/id_rsa-cert type -1
  debug1: identity file /home/user/.ssh/id_dsa type -1
  debug1: identity file /home/user/.ssh/id_dsa-cert type -1
  debug1: Remote protocol version 2.0, remote software version conker_1.0.315-a08d059 app-132
  debug1: no match: conker_1.0.315-a08d059 app-132
  debug1: Enabling compatibility mode for protocol 2.0
  debug1: Local version string SSH-2.0-SiteGround_Inc
  debug1: SSH2_MSG_KEXINIT sent
  debug1: SSH2_MSG_KEXINIT received
  debug1: kex: server-&gt;client aes128-ctr hmac-sha1 none
  debug1: kex: client-&gt;server aes128-ctr hmac-sha1 none
  debug1: sending SSH2_MSG_KEXDH_INIT
  debug1: expecting SSH2_MSG_KEXDH_REPLY
  debug1: Server host key: RSA 97:8c:1b:.......
  debug1: Host 'bitbucket.org' is known and matches the RSA host key.
  debug1: Found key in /home/user/.ssh/known_hosts:1
  debug1: ssh_rsa_verify: signature correct
  debug1: SSH2_MSG_NEWKEYS sent
  debug1: expecting SSH2_MSG_NEWKEYS
  debug1: SSH2_MSG_NEWKEYS received
  debug1: Roaming not allowed by server
  debug1: SSH2_MSG_SERVICE_REQUEST sent
  debug1: SSH2_MSG_SERVICE_ACCEPT received
  debug1: Authentications that can continue: publickey
  debug1: Next authentication method: publickey
  debug1: Offering RSA public key: /home/user/.ssh/id_rsa
  debug1: Server accepts key: pkalg ssh-rsa blen 279
  debug1: Trying private key: /home/user/.ssh/id_dsa
  debug1: No more authentication methods to try.
  </code></pre>
  
  <p>what am i missing? None of the example, forum or google searches helped me with this, neither the hosting support.</p>
  
  <p>Thanks for any help.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>ls -la ~/.ssh outputs this:</p>
  
  <pre><code>drwx------  2 user user 4096 Dec 12 17:22 .
  drwx--x--x 16 user user 4096 Dec 12 16:52 ..
  lrwxrwxrwx  1 user user   16 Sep 16  2014 authorized_keys -&gt; /etc/support.pub
  -rw-------  1 user user    0 Dec 12 17:23 authorized_keys2
  -rw-r--r--  1 user user  381 Dec 12 17:21 id_rsa
  </code></pre>