Home | News | Download | Packages | Forum | Wiki | Github

[SOLVED] Cannot connect via ssh


Dear friends

I have installed Void-musl on a MacBookAir. No Xorg, just a console.

  • WiFi runs ok via wpa_supplicant and dhcpcd
  • sshd is available in /var/service/
  • /etc/hostname contains “musl” as hostname

I’d like to connect to the MacBookAir from an iPad and have installed the app Terminus, where I have created this host:

  • Alias “musl”
  • Hostname “musl”
  • Username: a username of “musl”
  • Passwort: Password of the username
  • Use SSH

When trying to connect to “musl” from the iPad, I get the Terminus message

Undefined error: 0

From my Void-PC, I tried

 ssh -p 22 username@musl

and got

ssh: Could not resolve hostname musl: Name or service not known

The ufw firewall is installed on “musl”, but it does not make any difference whether it is enabled or disabled.

What do I have to do in order to get a ssh connection to “musl”? I googled around and searched in the Void Wiki and Forum, but did not find any hints that helped.

Many thanks and best regards!


The ipad has no idea what the ip address is for Void-musl on MacBookAir
Replace @musl with the @<i.p. address>
ssh username@ip address


Dear cardinal

Thanks for your suggestion!

I forgot to mention that we need to connect to “musl” on MacBookAir from within the Local Area Network only, not from “outside”. Does this make any difference?

I guessed so as you suggest, but then I’d have to assign a fixed IP address to “musl” on MacBookAir, not a dynamic one given by dhcp, right? Otherwise I’d have to log into the router and look for the dynamic adress of “musl” in order to connect, I guess?

Furthermore, in the Terminus app, I can enter an alias, a hostname and a username (see above), but I can’t connect by entering a ssh command. Should I look for another app?

From the iPad, I was able to log into OS X on the MacBookAir via the Screens app by selecting the hostname, not by entering an IP address; but I’ve never tried loggin into Linux. Unfortunately, Screens is not available for iOS 11, so I have to look for another solution. Any ideas?

Thanks for your patience with a network dummy :wink:


In order to have your box recognized on the network by hostname instead of IP you should either have it in your hosts file or have a local DNS server in your network. I’m assuming you don’t have any of those. It’s much easier to set a static IP address and then add it to /etc/hosts, but if you really want DHCP + hostname resolution you’ll have to configure a forwarding DNS server on your network and then tell your device to use that.

(rakor) #5

As @echo said. But to prevent setting static IP in your “musl” you can probably set the fixed IP in your router (dhcp-server). Then you don’t need to change anything on the “musl” and get a static IP by dhcp.


Dear friends

Many thanks for your hints and explanations!

I have assigned a fixed IP address to “musl” in the router, as suggested by @rakor. After disabling ufw, I could connect to “musl” via the Termius app on the iPad by entering the IP address in the “Hostname” field of Termius.

I’ll open port 22 in ufw this evening, then everything will be perfect :grinning:

Best regards