I used to connect to my raspberry pi via ssh using the hostname of the pi and vice versa. Now that doesn't work. I can connect by using the ip address, but that changes daily and it is annoying to continually have to find it. How can I configure my computer (and pi) to do this automatically? I am using debian and I would prefer to not set up my own dns server. Thanks!
-
Is this a home network? What device/software is currently serving DHCP on your network? (If it's a home network, it's probably your router.)longb4– longb42015-08-28 01:14:12 +00:00Commented Aug 28, 2015 at 1:14
-
This is my school's dns servercden– cden2015-08-28 19:36:04 +00:00Commented Aug 28, 2015 at 19:36
Add a comment
|
1 Answer
What are you using for DNS?
nslookup `hostname`
The output will show you your DNS server - this is where your problem is.
-
I keep running into the SERVFAIL problem when I do this and try the command
host hostname.It says "** server can't find (myhostname): SERVFAIL" I'm not sure what is wrong. I tried switching to openDNS and had the same issue, so I switched back. This is on a college campus and we don't have ipv6 here, so I disabled ipv6 ala wiki.debian.org/DebianIPv6#How_to_turn_off_IPv6 and it didn't help.cden– cden2015-08-28 14:04:05 +00:00Commented Aug 28, 2015 at 14:04 -
@cden Could your
/etc/hosts/file be broken?sebix– sebix2015-08-29 12:17:30 +00:00Commented Aug 29, 2015 at 12:17 -
@cden, what does your /etc/resolv.conf say? Are you using a network manager?wulfgarpro– wulfgarpro2015-08-31 02:21:10 +00:00Commented Aug 31, 2015 at 2:21