To SSH into your DigitalOcean droplet, follow these steps:
- Open a terminal or command prompt on your local machine.
- Use the
ssh
command with the username and IP address of your droplet. For example:
ssh root@123.456.78.90
Replace root
with the username for your droplet, and 123.456.78.90
with the IP address of your droplet.
- If this is your first time connecting to the droplet, you may see a message like this:
The authenticity of host '123.456.78.90 (123.456.78.90)' can't be established.
ECDSA key fingerprint is SHA256:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
Are you sure you want to continue connecting (yes/no)?
Type “yes” and press Enter to continue.
- If you have set up an SSH key pair for your droplet, you will be prompted to enter the passphrase for your private key. If you did not set up an SSH key pair, you will be prompted to enter the password for the droplet’s root user.
- You should now be connected to your droplet’s command line interface via SSH.
Note: Before connecting to your droplet, make sure that your droplet’s firewall rules allow SSH traffic. If you are unable to connect, ensure that your SSH key has been added to your droplet or that you are using the correct password for the root user.