ssh: connect to host 10.0.2.15 port 22: Connection refused

I have been trying the following command on the virtual machine in Ubuntu:

ssh [email protected]

But I keep in getting this response :

ssh: connect to host 10.0.2.15 port 22: Connection refused

I have checked my ssh status with this command :

service sshd status

And I got this result back:

Screenshot showing, among other information, "Server listening on :: port 22"


Use ssh with port option:

ssh [email protected] -p 2222

Edit

This issue happens when you change your ssh server port to a non standard port like 2222 in ssh config file. (/etc/ssh/sshd_config --> Port 2222)