I am trying to SSH to my Digital ocean droplet but it shows following error.
ssh: connect to host xxx.xx.xxx.x port 22: Operation timed out
I have already tried with the following commands. Nothing worked.
sudo ufw disable
sudo ufw allow ssh
sudo ufw enable
sudo ufw status
I have set up the SSH key.
Allowed 22 port with the below command
sudo ufw allow 22
If your droplet's IP is ${DROPLET}
and the location of your Digital Ocean SSH private key is ${IDENTITY}
, then you should be able to:
ssh -i ${IDENTITY} root@${IP}