How do I set up a domain name to SSH into my webserver?
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
New contributor
add a comment |
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
New contributor
1
Hey Michael! If it is just for type preference, would editing thehosts
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 editedhosts
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 usingssh <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
add a comment |
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
New contributor
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
networking server ssh dns webserver
New contributor
New contributor
New contributor
asked Mar 13 at 9:50
MichaelMichael
1
1
New contributor
New contributor
1
Hey Michael! If it is just for type preference, would editing thehosts
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 editedhosts
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 usingssh <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
add a comment |
1
Hey Michael! If it is just for type preference, would editing thehosts
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 editedhosts
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 usingssh <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
add a comment |
1 Answer
1
active
oldest
votes
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.
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
answered Mar 13 at 12:01
janmyszkierjanmyszkier
60338
60338
add a comment |
add a comment |
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.
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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 editedhosts
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 usingssh <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