The "ssh_init: host does not exist" error in FileZilla occurs when SSH/SFTP cannot resolve the hostname. This is common on systemd-based distros like Ubuntu, Debian, and CentOS 8+, where DNS settings and network configurations may interfere with hostname resolution.
Before troubleshooting SSH in FileZilla, check whether DNS is resolving the hostname correctly.
First, verify that your system has working DNS servers configured:
systemd-resolve --status | grep "DNS Servers"
If DNS servers are listed, your system has a working DNS configuration. If no DNS servers are listed, you'll need to update your DNS settings (see Step 3).
Try resolving your FTP/SFTP server hostname using systemd's resolver:
systemd-resolve yourserver.com
Or use the traditional host command:
host yourserver.com
If an IP address is returned, DNS is working correctly. If you see "host not found" or no IP address appears, move to Step 3.
If DNS is failing, try connecting using the server's IP address instead of the hostname.
If you don't know your server's IP address, retrieve it using:
dig yourserver.com +short
or
nslookup yourserver.com
Example Output:
192.168.1.10
Use this IP in FileZilla.
yourserver.com, enter 192.168.1.10 (your actual server IP).If the connection succeeds, DNS was the issue. You can continue using the IP address, or proceed with the following steps to fix DNS resolution so you can use the hostname.
If DNS resolution fails, you can manually set your system's DNS servers in systemd's configuration.
sudo nano /etc/systemd/resolved.conf
[Resolve]
DNS=8.8.8.8 1.1.1.1
FallbackDNS=8.8.4.4 1.0.0.1
Domains=~.
sudo systemctl restart systemd-resolved
Now, retry connecting in FileZilla.
If you've updated DNS settings, flush the cache to apply changes immediately.
sudo systemd-resolve --flush-caches
Now check again if your hostname resolves:
systemd-resolve yourserver.com
If an IP address appears, DNS is working correctly.
If the hostname still does not resolve, you can manually add it to your system's hosts file.
sudo nano /etc/hosts
192.168.1.10 yourserver.com
This forces your system to recognize the hostname regardless of DNS status. Now, SSH should recognize the hostname.
Restart networking to apply all network configuration changes.
sudo systemctl restart networking
For systems using NetworkManager (common on desktops):
nmcli networking off && nmcli networking on
Now retry SSH connection in FileZilla.
If SSH is being blocked by the firewall, you need to allow it through.
sudo ufw allow 22/tcp
sudo ufw reload
sudo firewall-cmd --add-service=ssh --permanent
sudo firewall-cmd --reload
Now try connecting again in FileZilla.
| Issue | Fix |
|---|---|
| Hostname not resolving (ssh_init: host does not exist) | Use server IP instead of hostname in FileZilla |
| DNS lookup fails | Check with systemd-resolve yourserver.com |
| System using old DNS records | Flush DNS with systemd-resolve --flush-caches |
| Incorrect system DNS settings | Set Google DNS in /etc/systemd/resolved.conf |
| Hostname missing | Manually add to /etc/hosts |
| Network issues | Restart networking with systemctl restart networking |
| Firewall blocking SSH | Allow ufw allow 22/tcp or firewall-cmd --add-service=ssh --permanent |
By following these steps, FileZilla should connect without the "ssh_init: host does not exist" error!