ish
ish copied to clipboard
Unable to SSH into Raspberry Pi using Hostname.local in iSH App
Issue Description:
I attempted to establish an SSH connection to my Raspberry Pi using the hostname.local address in the iSH app. However, I encountered the following error: ssh: Could not resolve hostname raspberrypi.local: Name does not resolve
. My intention behind setting up the iSH app was to create a portable, offline coding environment on my Pi, making it crucial to connect via the hostname.local address.
Interestingly, when using the Blink app on my iPad, I can successfully connect using the same hostname.local address and the user authentication credentials configured during the Pi OS setup.
System Information:
- Device: iPad Pro (12.9-inch) (4th generation)
- Operating System: iOS 17.1
- iSH Version: 1.3.2 (Build 494)
Raspberry Pi Information:
- Hostname: raspberrypi.local
- OS: Debian GNU/Linux 11 (bullseye) aarch64
- Hardware: Raspberry Pi 4 Model B Rev 1.1
- Kernel: 5.15.32-v8+
- Shell: bash 5.1.4
Steps to Reproduce:
- Attempt SSH connection using
ssh raspberrypi.local
. - Encounter error:
ssh: Could not resolve hostname raspberrypi.local: Name does not resolve
.
Expected Behavior: I should be able to establish an SSH connection to the Raspberry Pi using the hostname.local address within the iSH app, similar to the functionality observed in the Blink app.
Additional Information:
- I have successfully connected via IP address, but the objective is to connect using the hostname.local address.
- The same hostname.local address works flawlessly in the Blink app, indicating that the Pi's configuration might not be the issue.
Screenshots:
Note:
This issue significantly impacts my ability to use iSH as an offline coding environment on my Raspberry Pi. Any assistance or guidance to resolve this problem would be highly appreciated.
Login as root on the Pi.
First the avahi
daemon should be installed on the Pi.
Then configure : nano /etc/avahi/avahi-daemon.conf
...
[server]
# this name should match the hostname
host-name=raspberrypi
#domain-name=local
#browse-domains=0pointer.de, zeroconf.org
use-ipv4=yes
...
Then run service avahi-daemon restart
Now login from any client (including iSH) to the Pi. For me it does not work neither.
iPad-Air-2:~# ssh [email protected]
ssh: Could not resolve hostname raspberrypi.local: Name does not resolve
But you can try.
iSH uses Musl by default, which has a fairly anemic DNS resolver. Perhaps installing nss would help?
Login as root on the Pi. First the
avahi
daemon should be installed on the Pi. Then configure :nano /etc/avahi/avahi-daemon.conf
... [server] # this name should match the hostname host-name=raspberrypi #domain-name=local #browse-domains=0pointer.de, zeroconf.org use-ipv4=yes ...
Then run
service avahi-daemon restart
Now login from any client (including iSH) to the Pi. For me it does not work neither.
iPad-Air-2:~# ssh [email protected] ssh: Could not resolve hostname raspberrypi.local: Name does not resolve
But you can try.
I'll try to do this tonight and report back.
Any updates on this?? I think the problem is with iSH itself...
When you're saying "offline environment", how does the setup look like? Do you connect to RPI directly from your iPad?
If so, why not ignore DNS configs alltogether and connect via IP address?
If not, why not configure your router and local DNS server to respond to dns requests properly? (Maybe also add static MAC reservation?)