Because you don't really say anything, I'm going to assume that you have a relatively stock Ubuntu installation in that VM.
It muddies the water slightly when you say that you are using the "public" IP address of the VM, because this could mean a few different things.
However, one thing is worth noting: Your original error ("Network error: Connection refused" when you try connecting to port 22) tells you that you were able to reach the system running inside the VM, and that system said that nothing is listening on the particular IP address and port combination that you reached it on.
I'm pretty sure that the workstation Ubuntu installations do not ship a running SSH server by default. The server variants, however, might very well do so.
Use the VM console to log in, and check whether a SSH server is running. I don't have an Ubuntu system handy at the moment, but in a terminal, this should be similar to
$ service sshd status
It might be referred to as something like ssh, ssh-server, openssh-server or something along those lines instead of sshd, but tab completion on ssh (type sshtab) should get you close. You may need to sudo this, so e.g. sudo service sshd status, but I think regular user access should be sufficient to get a service status (running/stopped) report.
If no SSH server is running, or even installed, then that explains why you got a "Connection refused" error. Install a SSH server using something like:
$ sudo apt-get -u install openssh-server
Verify that the list of packages to be installed looks sane, and confirm. The SSH server will be started at the end of the installation process.
Now, look at /etc/ssh/sshd_config. It will have zero or more Port and ListenAddress directives giving IP addresses or port numbers (the port number defaults to 22 if not specified, and the server will listen on all IP addresses if you don't explicitly tell it otherwise). That's the IP address and port you need to connect to.
If no IP address(es) are specified, ip addr show will show you the network interfaces within the VM and their respective IP addresses. Those are the ones the SSH server will be listening on.
Armed with this information, perform whatever magic incantations are required to get PuTTY to connect to this combination of IP address and port. (This may involve punching a hole or configuring port forwarding in a NAT or firewall, for example.)
Once that is done, you should be able to connect using PuTTY and get a terminal session as an unprivileged user on the Ubuntu VM. From there, use sudo to elevate your privileges on an as-needed basis, just as if you were sitting in front of a physical system.
I recommend setting up public key authentication, and I very much recommend against allowing root to log in directly. However, if you absolutely must allow root to log in directly, then edit /etc/ssh/sshd_config and specify PermitRootLogin yes, then sudo passwd root and give root a good password, and restart the SSH daemon. Again, I do not recommend this.
With that out of the way, what was the issue with your connecting to ports 80 and 443? Port 80 is the default port for HTTP, and port 443 is the default port for HTTPS. If a web server is running, it is likely that it is listening on both of those ports, and when you connect, it will be expecting HTTP requests; in the case of port 443, after SSL negotiation. It is certainly possible to manually issue HTTP requests, but it isn't a terminal login session and a shell. In general, connecting to random ports (even well-known ports) is unlikely to get you the result you are after.