Hi @all,
I`m absolutely new in using openWRT but I have a bit experience in using other Linux/Unix distributions. If I try to connect by using ip adress over ssh (ssh root@ip) everything works like it should. But if I try to connect using the hostname instead of the ip adress I get absolutely no connection (ssh: Could not resolve hostname ...: Temporary failure in name resolution).
So, at first I have tried to insert a new line into the /etc/hosts (IP hostname). But this did not work.
Second thing was to search for the hostname config, like I know from other distributions. This helped me in further times. So I insert the same line into the /etc/sys/kernel/hostname. But this didnt work too.
And the third possible solution was to try the command "ssh root@hostname.local". But this was also not constructive. Then I tried a few other things I found on the web, but nothing worked for me.
Btw the hostname of the openWRT distribution is the same as configured in my router.
So I dont know what to do now and I`m really sad about this circumstance. Hope someone has another great idea to possibly fix this. Thanks in advance.
Some more information:
The ssh client is running on PC. These are local hosts in my network. Ping does only work with ip adress too and unfortunately not with the hostname. Ping message is "Name or service not known".
Question 1:
What about the /etc/resolv.conf? Could an entry there be a possible solution?
Question 2:
In further times using other distributions my solution was to edit the /etc/hosts and /etc/hostname and write a new line with "ip hostname" in it. But within openWRT I cant find /etc/hostname. Should I create one to fix the problem? Or is under openWRT /etc/sys/kernel/hostname the same as in other distributions /etc/hostname?
Question 3:
What else could I do? Meanwhile Im feeling totally hopeless, because I`m working on that since hours. Unfortunately I cant find any resolved.conf file to check out same configs like for example under Linux Mint. I read about configurations in /etc/init.d/network. Could this be a possible solution?