Currently when I login to SSH the name is root@my-initial-droplet-name, how to change it to root@new-droplet-name?
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!
root@ ssh key pair some place safe.ssh-keygen - (keep it to a different place to your root keys).mrwww.root. sudo or doas are god for this.echo 'mrwww ALL=(ALL) ALL' >> /etc/sudoers.pub from the new key pair into ~mrwww/.ssh/authorized_keys, and chmod 0400 it.ssh -i /path/to/new-id_rsa mrwww@yourdropletsudo touch /tmp/whatls -l /tmp/what # this should show the file created by root.Hi, thanks for answering, but it seems your guide is to create new user, what I want is changing the name after @ on SSH command line, from root@my-initial-droplet-name to root@new-droplet-name.
Changing droplet name doesn’t change this SSH address. I already deleted the login detail on my winscp and recreate it, but doesn’t change anything either. Thanks
For most distros you will use hostnamectl on the command line.
https://www.freedesktop.org/software/systemd/man/hostnamectl.html
http://manpages.ubuntu.com/manpages/xenial/man1/hostnamectl.1.html
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.