Visit site

🎒 generate SSH aliases for your Droplets based on their hostnames.

do-ssh-alias is a small bash script that generates SSH aliases for your Droplets based on their hostnames. For example, if you have a Droplet named, this script will create aliases for ssh shiny and ssh

Let’s assume you have a Droplet named shiny-blog. Usually you would look up its IP address and then SSH into it like so:

ssh username@

What if, instead, you could simply run the following command?

ssh shiny-blog

This is where do-ssh-alias comes in. It creates SSH aliases for all your Droplets at once so you can easily SSH in, without having to worry about what user or hostname to use.

It is especially useful if your Droplets’ hostnames are FQDNs (e.g. that don’t point directly to the Droplets’ IP addresses. One example is using Cloudflare in front of your website, so your domain name resolves to a Cloudflare server instead of your Droplet.

For installation and usage instructions, please see: Have a lot of Droplets? Use do-ssh-alias for easier SSH access

Was this helpful?
Leave a comment

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Publish your Tool on Community

Have you created an Integration, API Wrapper, Service, or other Tool that helps developers build on DigitalOcean? Help users find it by listing it in Community Tools.

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel