There might be a firewall service running on remote server and hence it is blocking the access.
$ sudo su
# apt install firewalld (If not installed)
# firewall-cmd --permanent --add-port=22/tcp
Or
$ apt install firewalld (If not installed)
$ sudo ufw allow 22/tcp