Permission denied when SSHing into Ubuntu Virtual Machine

I have a VirtualBox machine running Ubuntu 18.04.2. I have installed OpenSSH on it.

In the Settings of the Virtual Machine I have set up this port forwarding rule:

Protocol: TCP

Host IP:

Host Port: 2222

Guest IP:

Guest Port: 22

The SSH command I run in my local terminal is:

ssh myname@ -p2222 

It then asks me for the password, which I enter, and I get this error:

Permission denied, please try again.

The username and password are the ones I created when setting up Ubuntu.