By vincej
So, I just created a droplet. And I gave it a name. However, when I access that droplet though ssh it comes up with a great long name:
root@laravel-ubuntu-s-1vcpu-2gb-amd-lon1-01:~#
Now, when I have created droplets in the past, they would have been referenced like this:
root@‘my-website’
So - what have I done wrong, and can I chnage it ?
Many thanks !
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!
Accepted Answer
Hi @vincej,
During the time of droplet launch, you can change/edit the hostname under the “Choose a hostname” section.
For more information : https://docs.digitalocean.com/products/droplets/how-to/create/
And for renaming droplets, You can accomplish this by following the steps listed below.
Renaming the droplet changes the name on the Cloud panel as well as updating the RDNS record, but it doesn’t automatically update the hostname inside the droplet configuration. You will need to update the droplet hostname within Droplet operating system.
You can achieve this by either updating /etc/hostname and /etc/hosts files, or by using hostname utility hostnamectl.
Update /etc/hostname : https://www.cyberciti.biz/faq/ubuntu-change-hostname-command/
Use hostnamectl : https://www.cyberciti.biz/faq/ubuntu-18-04-lts-change-hostname-permanently/
I hope this helps!
Regards, Rajkishore
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.