How do I set up a domain name to SSH into my webserver?












0















I'm running a webserver (running Ubuntu 16.04) in my mother's front room that I'll be using to host sites for the two of us. I'm moving out next week so I'll be managing it remotely.



I have set up my current websites with dynu.com for Dynamic DNS so that the DNS records will change when the dynamic IP on the home router changes. However, I would like to set up a domain name for the server itself, solely to be used when connecting to it via SSH, so I can type ssh user@myservername.com rather than ssh user@123.234.210.123. Is there an easy way to do this, or would it involve setting up my own DNS server?










share|improve this question







New contributor




Michael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1





    Hey Michael! If it is just for type preference, would editing the hosts file be discouraged here? You could attribute the naming you'd desire without having to actually configure further systems. Would also only work on the computer with the edited hosts file. If you wish to be able to use that naming anywhere though, then forget my proposition

    – Diogo Santo
    Mar 13 at 9:55











  • You could use tools like No IP to help you have a free domain and an up to date ip from your home as well. What do you recon? :)

    – Diogo Santo
    Mar 13 at 9:57











  • Hey Diego, I can actually set up dynamic DNS updating from my Netgear router with No-IP (I didn't go with it for my actual websites as I wanted more than 3 and dynu.com was was cheaper). But how do I actually set up a domain name for SSH in the Ubuntu side of things? Just edit the hosts file?

    – Michael
    Mar 13 at 14:11











  • Thank you for sharing that @Michael! Whenever I do not wish to type ips and prefer a significant explicit word, I set that in my /etc/hosts file. Lets say I want to connect to 92.13.5.1 but dont want to keep remembering or typing the ip, I just go to /etc/hosts and add it as <ip> test-server for example, and can then connect using ssh <user>@test-server instead of the ip per say. But I am a bit confused if such would be a solution you wish or looking for DNS because you can be trying to access from many different computers. Editing /etc/hosts is like a personal singular pc "solution"

    – Diogo Santo
    Mar 13 at 14:18











  • I have a feeling you are actually looking on creating a DNS service? If so, I apologise as what I am referring is not what you are looking for!

    – Diogo Santo
    Mar 13 at 14:20
















0















I'm running a webserver (running Ubuntu 16.04) in my mother's front room that I'll be using to host sites for the two of us. I'm moving out next week so I'll be managing it remotely.



I have set up my current websites with dynu.com for Dynamic DNS so that the DNS records will change when the dynamic IP on the home router changes. However, I would like to set up a domain name for the server itself, solely to be used when connecting to it via SSH, so I can type ssh user@myservername.com rather than ssh user@123.234.210.123. Is there an easy way to do this, or would it involve setting up my own DNS server?










share|improve this question







New contributor




Michael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1





    Hey Michael! If it is just for type preference, would editing the hosts file be discouraged here? You could attribute the naming you'd desire without having to actually configure further systems. Would also only work on the computer with the edited hosts file. If you wish to be able to use that naming anywhere though, then forget my proposition

    – Diogo Santo
    Mar 13 at 9:55











  • You could use tools like No IP to help you have a free domain and an up to date ip from your home as well. What do you recon? :)

    – Diogo Santo
    Mar 13 at 9:57











  • Hey Diego, I can actually set up dynamic DNS updating from my Netgear router with No-IP (I didn't go with it for my actual websites as I wanted more than 3 and dynu.com was was cheaper). But how do I actually set up a domain name for SSH in the Ubuntu side of things? Just edit the hosts file?

    – Michael
    Mar 13 at 14:11











  • Thank you for sharing that @Michael! Whenever I do not wish to type ips and prefer a significant explicit word, I set that in my /etc/hosts file. Lets say I want to connect to 92.13.5.1 but dont want to keep remembering or typing the ip, I just go to /etc/hosts and add it as <ip> test-server for example, and can then connect using ssh <user>@test-server instead of the ip per say. But I am a bit confused if such would be a solution you wish or looking for DNS because you can be trying to access from many different computers. Editing /etc/hosts is like a personal singular pc "solution"

    – Diogo Santo
    Mar 13 at 14:18











  • I have a feeling you are actually looking on creating a DNS service? If so, I apologise as what I am referring is not what you are looking for!

    – Diogo Santo
    Mar 13 at 14:20














0












0








0








I'm running a webserver (running Ubuntu 16.04) in my mother's front room that I'll be using to host sites for the two of us. I'm moving out next week so I'll be managing it remotely.



I have set up my current websites with dynu.com for Dynamic DNS so that the DNS records will change when the dynamic IP on the home router changes. However, I would like to set up a domain name for the server itself, solely to be used when connecting to it via SSH, so I can type ssh user@myservername.com rather than ssh user@123.234.210.123. Is there an easy way to do this, or would it involve setting up my own DNS server?










share|improve this question







New contributor




Michael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I'm running a webserver (running Ubuntu 16.04) in my mother's front room that I'll be using to host sites for the two of us. I'm moving out next week so I'll be managing it remotely.



I have set up my current websites with dynu.com for Dynamic DNS so that the DNS records will change when the dynamic IP on the home router changes. However, I would like to set up a domain name for the server itself, solely to be used when connecting to it via SSH, so I can type ssh user@myservername.com rather than ssh user@123.234.210.123. Is there an easy way to do this, or would it involve setting up my own DNS server?







networking server ssh dns webserver






share|improve this question







New contributor




Michael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




Michael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




Michael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Mar 13 at 9:50









MichaelMichael

1




1




New contributor




Michael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Michael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Michael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 1





    Hey Michael! If it is just for type preference, would editing the hosts file be discouraged here? You could attribute the naming you'd desire without having to actually configure further systems. Would also only work on the computer with the edited hosts file. If you wish to be able to use that naming anywhere though, then forget my proposition

    – Diogo Santo
    Mar 13 at 9:55











  • You could use tools like No IP to help you have a free domain and an up to date ip from your home as well. What do you recon? :)

    – Diogo Santo
    Mar 13 at 9:57











  • Hey Diego, I can actually set up dynamic DNS updating from my Netgear router with No-IP (I didn't go with it for my actual websites as I wanted more than 3 and dynu.com was was cheaper). But how do I actually set up a domain name for SSH in the Ubuntu side of things? Just edit the hosts file?

    – Michael
    Mar 13 at 14:11











  • Thank you for sharing that @Michael! Whenever I do not wish to type ips and prefer a significant explicit word, I set that in my /etc/hosts file. Lets say I want to connect to 92.13.5.1 but dont want to keep remembering or typing the ip, I just go to /etc/hosts and add it as <ip> test-server for example, and can then connect using ssh <user>@test-server instead of the ip per say. But I am a bit confused if such would be a solution you wish or looking for DNS because you can be trying to access from many different computers. Editing /etc/hosts is like a personal singular pc "solution"

    – Diogo Santo
    Mar 13 at 14:18











  • I have a feeling you are actually looking on creating a DNS service? If so, I apologise as what I am referring is not what you are looking for!

    – Diogo Santo
    Mar 13 at 14:20














  • 1





    Hey Michael! If it is just for type preference, would editing the hosts file be discouraged here? You could attribute the naming you'd desire without having to actually configure further systems. Would also only work on the computer with the edited hosts file. If you wish to be able to use that naming anywhere though, then forget my proposition

    – Diogo Santo
    Mar 13 at 9:55











  • You could use tools like No IP to help you have a free domain and an up to date ip from your home as well. What do you recon? :)

    – Diogo Santo
    Mar 13 at 9:57











  • Hey Diego, I can actually set up dynamic DNS updating from my Netgear router with No-IP (I didn't go with it for my actual websites as I wanted more than 3 and dynu.com was was cheaper). But how do I actually set up a domain name for SSH in the Ubuntu side of things? Just edit the hosts file?

    – Michael
    Mar 13 at 14:11











  • Thank you for sharing that @Michael! Whenever I do not wish to type ips and prefer a significant explicit word, I set that in my /etc/hosts file. Lets say I want to connect to 92.13.5.1 but dont want to keep remembering or typing the ip, I just go to /etc/hosts and add it as <ip> test-server for example, and can then connect using ssh <user>@test-server instead of the ip per say. But I am a bit confused if such would be a solution you wish or looking for DNS because you can be trying to access from many different computers. Editing /etc/hosts is like a personal singular pc "solution"

    – Diogo Santo
    Mar 13 at 14:18











  • I have a feeling you are actually looking on creating a DNS service? If so, I apologise as what I am referring is not what you are looking for!

    – Diogo Santo
    Mar 13 at 14:20








1




1





Hey Michael! If it is just for type preference, would editing the hosts file be discouraged here? You could attribute the naming you'd desire without having to actually configure further systems. Would also only work on the computer with the edited hosts file. If you wish to be able to use that naming anywhere though, then forget my proposition

– Diogo Santo
Mar 13 at 9:55





Hey Michael! If it is just for type preference, would editing the hosts file be discouraged here? You could attribute the naming you'd desire without having to actually configure further systems. Would also only work on the computer with the edited hosts file. If you wish to be able to use that naming anywhere though, then forget my proposition

– Diogo Santo
Mar 13 at 9:55













You could use tools like No IP to help you have a free domain and an up to date ip from your home as well. What do you recon? :)

– Diogo Santo
Mar 13 at 9:57





You could use tools like No IP to help you have a free domain and an up to date ip from your home as well. What do you recon? :)

– Diogo Santo
Mar 13 at 9:57













Hey Diego, I can actually set up dynamic DNS updating from my Netgear router with No-IP (I didn't go with it for my actual websites as I wanted more than 3 and dynu.com was was cheaper). But how do I actually set up a domain name for SSH in the Ubuntu side of things? Just edit the hosts file?

– Michael
Mar 13 at 14:11





Hey Diego, I can actually set up dynamic DNS updating from my Netgear router with No-IP (I didn't go with it for my actual websites as I wanted more than 3 and dynu.com was was cheaper). But how do I actually set up a domain name for SSH in the Ubuntu side of things? Just edit the hosts file?

– Michael
Mar 13 at 14:11













Thank you for sharing that @Michael! Whenever I do not wish to type ips and prefer a significant explicit word, I set that in my /etc/hosts file. Lets say I want to connect to 92.13.5.1 but dont want to keep remembering or typing the ip, I just go to /etc/hosts and add it as <ip> test-server for example, and can then connect using ssh <user>@test-server instead of the ip per say. But I am a bit confused if such would be a solution you wish or looking for DNS because you can be trying to access from many different computers. Editing /etc/hosts is like a personal singular pc "solution"

– Diogo Santo
Mar 13 at 14:18





Thank you for sharing that @Michael! Whenever I do not wish to type ips and prefer a significant explicit word, I set that in my /etc/hosts file. Lets say I want to connect to 92.13.5.1 but dont want to keep remembering or typing the ip, I just go to /etc/hosts and add it as <ip> test-server for example, and can then connect using ssh <user>@test-server instead of the ip per say. But I am a bit confused if such would be a solution you wish or looking for DNS because you can be trying to access from many different computers. Editing /etc/hosts is like a personal singular pc "solution"

– Diogo Santo
Mar 13 at 14:18













I have a feeling you are actually looking on creating a DNS service? If so, I apologise as what I am referring is not what you are looking for!

– Diogo Santo
Mar 13 at 14:20





I have a feeling you are actually looking on creating a DNS service? If so, I apologise as what I am referring is not what you are looking for!

– Diogo Santo
Mar 13 at 14:20










1 Answer
1






active

oldest

votes


















0














as long as you use dyndns (http://manpages.ubuntu.com/manpages/bionic/man1/dyndns.1.html) correctly there's no need to additionally setup anything and you will be able to connect to the hostname via domain name. I had this running with my own domain some time ago and it worked fine every time the router IP changed. You could just use the domain name then, since it was already updated on the DNS side.






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });






    Michael is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1125267%2fhow-do-i-set-up-a-domain-name-to-ssh-into-my-webserver%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    as long as you use dyndns (http://manpages.ubuntu.com/manpages/bionic/man1/dyndns.1.html) correctly there's no need to additionally setup anything and you will be able to connect to the hostname via domain name. I had this running with my own domain some time ago and it worked fine every time the router IP changed. You could just use the domain name then, since it was already updated on the DNS side.






    share|improve this answer




























      0














      as long as you use dyndns (http://manpages.ubuntu.com/manpages/bionic/man1/dyndns.1.html) correctly there's no need to additionally setup anything and you will be able to connect to the hostname via domain name. I had this running with my own domain some time ago and it worked fine every time the router IP changed. You could just use the domain name then, since it was already updated on the DNS side.






      share|improve this answer


























        0












        0








        0







        as long as you use dyndns (http://manpages.ubuntu.com/manpages/bionic/man1/dyndns.1.html) correctly there's no need to additionally setup anything and you will be able to connect to the hostname via domain name. I had this running with my own domain some time ago and it worked fine every time the router IP changed. You could just use the domain name then, since it was already updated on the DNS side.






        share|improve this answer













        as long as you use dyndns (http://manpages.ubuntu.com/manpages/bionic/man1/dyndns.1.html) correctly there's no need to additionally setup anything and you will be able to connect to the hostname via domain name. I had this running with my own domain some time ago and it worked fine every time the router IP changed. You could just use the domain name then, since it was already updated on the DNS side.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 13 at 12:01









        janmyszkierjanmyszkier

        60338




        60338






















            Michael is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            Michael is a new contributor. Be nice, and check out our Code of Conduct.













            Michael is a new contributor. Be nice, and check out our Code of Conduct.












            Michael is a new contributor. Be nice, and check out our Code of Conduct.
















            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1125267%2fhow-do-i-set-up-a-domain-name-to-ssh-into-my-webserver%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How did Captain America manage to do this?

            迪纳利

            南乌拉尔铁路局