How to access ubuntu server using just hostname and not hostaname.local

Clash Royale CLAN TAG#URR8PPP up vote
0
down vote
favorite
I have a ubuntu-Server 16.04 LTS running and fully updated. I can access it through IP Address and hostname.local, but if I try to access it with just hostname it can't reach the address. hostname and host files are properly configure.
Details about My hosts:
- ubuntu-server 16.04 (lets call it ubuntuserver for better
undestanding); - ubuntu 17.10 (called ubuntudesktop);
- windows (called firstwin);
- windows (called secondwin).
Note that I can ping ubuntudesktop with just the hostname with any Operating System
16.04 server hostname
add a comment |Â
up vote
0
down vote
favorite
I have a ubuntu-Server 16.04 LTS running and fully updated. I can access it through IP Address and hostname.local, but if I try to access it with just hostname it can't reach the address. hostname and host files are properly configure.
Details about My hosts:
- ubuntu-server 16.04 (lets call it ubuntuserver for better
undestanding); - ubuntu 17.10 (called ubuntudesktop);
- windows (called firstwin);
- windows (called secondwin).
Note that I can ping ubuntudesktop with just the hostname with any Operating System
16.04 server hostname
How do you trying to get access to server? by ssh? Does the server responding on pings when you trying to ping it by hostname?
â Dexter Morganov
Feb 15 at 8:29
Not just SSH, I use this server for media, database and backup. I have two machines with windows and one ubuntu. With ubuntu I can Access it using hostname.local and IP. On windows only IP works
â alculete
Feb 15 at 14:07
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a ubuntu-Server 16.04 LTS running and fully updated. I can access it through IP Address and hostname.local, but if I try to access it with just hostname it can't reach the address. hostname and host files are properly configure.
Details about My hosts:
- ubuntu-server 16.04 (lets call it ubuntuserver for better
undestanding); - ubuntu 17.10 (called ubuntudesktop);
- windows (called firstwin);
- windows (called secondwin).
Note that I can ping ubuntudesktop with just the hostname with any Operating System
16.04 server hostname
I have a ubuntu-Server 16.04 LTS running and fully updated. I can access it through IP Address and hostname.local, but if I try to access it with just hostname it can't reach the address. hostname and host files are properly configure.
Details about My hosts:
- ubuntu-server 16.04 (lets call it ubuntuserver for better
undestanding); - ubuntu 17.10 (called ubuntudesktop);
- windows (called firstwin);
- windows (called secondwin).
Note that I can ping ubuntudesktop with just the hostname with any Operating System
16.04 server hostname
16.04 server hostname
edited Feb 15 at 13:56
asked Feb 15 at 8:09
alculete
44113
44113
How do you trying to get access to server? by ssh? Does the server responding on pings when you trying to ping it by hostname?
â Dexter Morganov
Feb 15 at 8:29
Not just SSH, I use this server for media, database and backup. I have two machines with windows and one ubuntu. With ubuntu I can Access it using hostname.local and IP. On windows only IP works
â alculete
Feb 15 at 14:07
add a comment |Â
How do you trying to get access to server? by ssh? Does the server responding on pings when you trying to ping it by hostname?
â Dexter Morganov
Feb 15 at 8:29
Not just SSH, I use this server for media, database and backup. I have two machines with windows and one ubuntu. With ubuntu I can Access it using hostname.local and IP. On windows only IP works
â alculete
Feb 15 at 14:07
How do you trying to get access to server? by ssh? Does the server responding on pings when you trying to ping it by hostname?
â Dexter Morganov
Feb 15 at 8:29
How do you trying to get access to server? by ssh? Does the server responding on pings when you trying to ping it by hostname?
â Dexter Morganov
Feb 15 at 8:29
Not just SSH, I use this server for media, database and backup. I have two machines with windows and one ubuntu. With ubuntu I can Access it using hostname.local and IP. On windows only IP works
â alculete
Feb 15 at 14:07
Not just SSH, I use this server for media, database and backup. I have two machines with windows and one ubuntu. With ubuntu I can Access it using hostname.local and IP. On windows only IP works
â alculete
Feb 15 at 14:07
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
0
down vote
You have configured hostname and hosts on your server only. In this case only server knows it's hostname.
For access to this server by it's hostname your should have properly configured DNS records or records in hosts file on your computer (for correct resolving hostname to IP address).
I have an application running on this server as well accessed by smartphone, windows and a ubuntu machine. This doesn't seems to be the right approach. As I said before I can access it with hostname.local and not just hostname
â alculete
Feb 20 at 13:27
add a comment |Â
up vote
0
down vote
If you want the hostname and hostname.local to be resolved, and you use linux to access hostname, you have to add
search local
in your /etc/resolv.conf file. I am not sure how you do that if resolv.conf is generated. However, take a look at http://man7.org/linux/man-pages/man5/resolv.conf.5.html, where you can see directives for resolv.conf file.
You should always add your domain(s) with search if you want that also short names would be resolved correctly. If you computer is also in the same domain you can also use domain keyword. Since your top domain is local you do not have to change ndots option.
Probably the simplest way to make this work is to name your computer from where you try to access hostname to be yourcomputer.local. In that way, local will automatically be considered as your domain and both (hostname and hostname.local) will be resolved.
You did not give enough detail, what OS are you using to access hostname and how do you want to access it.
I've added more information on the problem I hope helps
â alculete
Feb 15 at 13:58
I use both Linux and Windows to access
â alculete
Feb 19 at 9:26
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
You have configured hostname and hosts on your server only. In this case only server knows it's hostname.
For access to this server by it's hostname your should have properly configured DNS records or records in hosts file on your computer (for correct resolving hostname to IP address).
I have an application running on this server as well accessed by smartphone, windows and a ubuntu machine. This doesn't seems to be the right approach. As I said before I can access it with hostname.local and not just hostname
â alculete
Feb 20 at 13:27
add a comment |Â
up vote
0
down vote
You have configured hostname and hosts on your server only. In this case only server knows it's hostname.
For access to this server by it's hostname your should have properly configured DNS records or records in hosts file on your computer (for correct resolving hostname to IP address).
I have an application running on this server as well accessed by smartphone, windows and a ubuntu machine. This doesn't seems to be the right approach. As I said before I can access it with hostname.local and not just hostname
â alculete
Feb 20 at 13:27
add a comment |Â
up vote
0
down vote
up vote
0
down vote
You have configured hostname and hosts on your server only. In this case only server knows it's hostname.
For access to this server by it's hostname your should have properly configured DNS records or records in hosts file on your computer (for correct resolving hostname to IP address).
You have configured hostname and hosts on your server only. In this case only server knows it's hostname.
For access to this server by it's hostname your should have properly configured DNS records or records in hosts file on your computer (for correct resolving hostname to IP address).
answered Feb 15 at 8:55
Dexter Morganov
42228
42228
I have an application running on this server as well accessed by smartphone, windows and a ubuntu machine. This doesn't seems to be the right approach. As I said before I can access it with hostname.local and not just hostname
â alculete
Feb 20 at 13:27
add a comment |Â
I have an application running on this server as well accessed by smartphone, windows and a ubuntu machine. This doesn't seems to be the right approach. As I said before I can access it with hostname.local and not just hostname
â alculete
Feb 20 at 13:27
I have an application running on this server as well accessed by smartphone, windows and a ubuntu machine. This doesn't seems to be the right approach. As I said before I can access it with hostname.local and not just hostname
â alculete
Feb 20 at 13:27
I have an application running on this server as well accessed by smartphone, windows and a ubuntu machine. This doesn't seems to be the right approach. As I said before I can access it with hostname.local and not just hostname
â alculete
Feb 20 at 13:27
add a comment |Â
up vote
0
down vote
If you want the hostname and hostname.local to be resolved, and you use linux to access hostname, you have to add
search local
in your /etc/resolv.conf file. I am not sure how you do that if resolv.conf is generated. However, take a look at http://man7.org/linux/man-pages/man5/resolv.conf.5.html, where you can see directives for resolv.conf file.
You should always add your domain(s) with search if you want that also short names would be resolved correctly. If you computer is also in the same domain you can also use domain keyword. Since your top domain is local you do not have to change ndots option.
Probably the simplest way to make this work is to name your computer from where you try to access hostname to be yourcomputer.local. In that way, local will automatically be considered as your domain and both (hostname and hostname.local) will be resolved.
You did not give enough detail, what OS are you using to access hostname and how do you want to access it.
I've added more information on the problem I hope helps
â alculete
Feb 15 at 13:58
I use both Linux and Windows to access
â alculete
Feb 19 at 9:26
add a comment |Â
up vote
0
down vote
If you want the hostname and hostname.local to be resolved, and you use linux to access hostname, you have to add
search local
in your /etc/resolv.conf file. I am not sure how you do that if resolv.conf is generated. However, take a look at http://man7.org/linux/man-pages/man5/resolv.conf.5.html, where you can see directives for resolv.conf file.
You should always add your domain(s) with search if you want that also short names would be resolved correctly. If you computer is also in the same domain you can also use domain keyword. Since your top domain is local you do not have to change ndots option.
Probably the simplest way to make this work is to name your computer from where you try to access hostname to be yourcomputer.local. In that way, local will automatically be considered as your domain and both (hostname and hostname.local) will be resolved.
You did not give enough detail, what OS are you using to access hostname and how do you want to access it.
I've added more information on the problem I hope helps
â alculete
Feb 15 at 13:58
I use both Linux and Windows to access
â alculete
Feb 19 at 9:26
add a comment |Â
up vote
0
down vote
up vote
0
down vote
If you want the hostname and hostname.local to be resolved, and you use linux to access hostname, you have to add
search local
in your /etc/resolv.conf file. I am not sure how you do that if resolv.conf is generated. However, take a look at http://man7.org/linux/man-pages/man5/resolv.conf.5.html, where you can see directives for resolv.conf file.
You should always add your domain(s) with search if you want that also short names would be resolved correctly. If you computer is also in the same domain you can also use domain keyword. Since your top domain is local you do not have to change ndots option.
Probably the simplest way to make this work is to name your computer from where you try to access hostname to be yourcomputer.local. In that way, local will automatically be considered as your domain and both (hostname and hostname.local) will be resolved.
You did not give enough detail, what OS are you using to access hostname and how do you want to access it.
If you want the hostname and hostname.local to be resolved, and you use linux to access hostname, you have to add
search local
in your /etc/resolv.conf file. I am not sure how you do that if resolv.conf is generated. However, take a look at http://man7.org/linux/man-pages/man5/resolv.conf.5.html, where you can see directives for resolv.conf file.
You should always add your domain(s) with search if you want that also short names would be resolved correctly. If you computer is also in the same domain you can also use domain keyword. Since your top domain is local you do not have to change ndots option.
Probably the simplest way to make this work is to name your computer from where you try to access hostname to be yourcomputer.local. In that way, local will automatically be considered as your domain and both (hostname and hostname.local) will be resolved.
You did not give enough detail, what OS are you using to access hostname and how do you want to access it.
edited Feb 15 at 10:42
answered Feb 15 at 8:55
nobody
3,084912
3,084912
I've added more information on the problem I hope helps
â alculete
Feb 15 at 13:58
I use both Linux and Windows to access
â alculete
Feb 19 at 9:26
add a comment |Â
I've added more information on the problem I hope helps
â alculete
Feb 15 at 13:58
I use both Linux and Windows to access
â alculete
Feb 19 at 9:26
I've added more information on the problem I hope helps
â alculete
Feb 15 at 13:58
I've added more information on the problem I hope helps
â alculete
Feb 15 at 13:58
I use both Linux and Windows to access
â alculete
Feb 19 at 9:26
I use both Linux and Windows to access
â alculete
Feb 19 at 9:26
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1006383%2fhow-to-access-ubuntu-server-using-just-hostname-and-not-hostaname-local%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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
How do you trying to get access to server? by ssh? Does the server responding on pings when you trying to ping it by hostname?
â Dexter Morganov
Feb 15 at 8:29
Not just SSH, I use this server for media, database and backup. I have two machines with windows and one ubuntu. With ubuntu I can Access it using hostname.local and IP. On windows only IP works
â alculete
Feb 15 at 14:07