📖 ~1 min read
Table of contents
Symptom & Impact
Administrators observe: Ubuntu 26.04 LTS – netplan apply disconnects remote SSH session. Remote management access can be lost during maintenance.
Environment & Reproduction
Issue appears when route or renderer settings are changed on remote hosts.
# Baseline context
lsb_release -a
ip -br a
ip r
networkctl status --no-pager || true
ls /etc/netplan
Root Cause Analysis
Incorrect default route, interface names, or renderer mismatch can drop connectivity immediately when netplan applies changes.
Quick Triage
Validate syntax and current gateway before applying changes.
# Quick triage
sudo netplan generate
sudo netplan get
ip route get 1.1.1.1
cat /etc/netplan/*.yaml
Step-by-Step Diagnosis
Use try mode to test rollback-safe changes and inspect rendered backend config.
# Detailed diagnosis
sudo netplan status --all || true
sudo netplan try --timeout 120
sudo journalctl -u systemd-networkd -n 100 --no-pager || true
sudo journalctl -u NetworkManager -n 100 --no-pager || true

Solution – Primary Fix
Correct interface mapping and gateway settings, then apply with confirmation path.
Still having issues? Our Network Design team can diagnose and resolve this for you. Get in touch for a free consultation.
# Primary fix
sudo cp -a /etc/netplan /etc/netplan.backup.$(date +%F)
sudoedit /etc/netplan/01-netcfg.yaml
sudo netplan generate
sudo netplan try --timeout 120
sudo netplan apply

Solution – Alternative Approaches
Temporarily configure a fallback static route before applying full changes.
# Alternative
sudo ip route add default via dev metric 500
sudo netplan apply
# Remove temporary route after validation
sudo ip route del default via dev metric 500
Verification & Acceptance Criteria
SSH remains stable, routes are correct, and DNS/network reachability passes checks.
# Verify
ip -br a
ip r
ping -c 3 1.1.1.1
getent hosts archive.ubuntu.com
systemctl is-active ssh
Rollback Plan
Restore known-good netplan YAML and reapply from console access if remote connectivity fails.
# Rollback
sudo rm -f /etc/netplan/*.yaml
sudo cp -a /etc/netplan.backup./*.yaml /etc/netplan/
sudo netplan apply
Prevention & Hardening
Always use netplan try on remote systems and maintain out-of-band console access.
# Hardening
sudo apt-get install -y ethtool
networkctl list || true
sudo netplan status --all || true
Related Errors & Cross-Refs
Related issues include renderer mismatch, duplicate default routes, and incorrect interface names after hardware changes.
Related tutorial: View the step-by-step tutorial for Ubuntu 26.04 LTS.
View all Ubuntu 26.04 LTS tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Netplan reference documentation and Ubuntu networking administration guide.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today — we respond within one business day.