title: vagrant ssh is calling 22 instead of 2222? - Permission denied (publickey)
body: <p>For years I've used <code>vagrant ssh</code> to get into my VirtualBox / Ubuntu 16.04 setup.  I recently had problems with the default setup and permissions, an issue discussed extensively online, so started using custom keys.  I've pasted the public key into /home/ubuntu/authorized_keys in my Ubuntu box VM and pointed my Vagrantfile to the private key at ~/.ssh/id_ecdsa.</p>
  
  <p>The problem is that when I <code>vagrant ssh</code> I get the error:</p>
  
  <p><code>vagrant@127.0.0.1: Permission denied (publickey)</code></p>
  
  <p>I can connect with: <code>ssh vagrant@127.0.0.1 -p 2222</code>  but I want to use <code>vagrant ssh</code> again.</p>
  
  <p>During boot up:  <code>SSH address: 127.0.0.1:2222</code> and I can connect to that with Webstorm and the "OpenSSH and authentication agent" config.</p>
  
  <pre><code>    § vagrant ssh-config
          Host pfbox
            HostName 127.0.0.1
            User vagrant
            Port 2222
  </code></pre>
  
  <p>If I <code>ssh vagrant@127.0.0.1</code> I get the message <code>ssh: connect to host 127.0.0.1 port 22: Connection refused</code></p>
  
  <p>Maybe <code>vagrant ssh</code> is calling port 22 instead of 2222?  Maybe something is wrong with my custom keys setup?  I'm lost after lots of research online.</p>
  
  <p>I used <code>ssh-keygen -t ecdsa -b 521</code> to create the keys which is recommended by OpenSSH on their site. I've also tried this with rsa. </p>
  
  <p>MBP Mojave, Vagrant 2.2.3 / VirtualBox 6.0.2.</p>