π ~1 min read
Table of contents
Symptom & Impact
Applying netplan immediately disconnects SSH sessions, causing remote administration downtime.
Environment & Reproduction
Occurs on Ubuntu 22.04 LTS when interface names, gateways, or routes are changed remotely.
Root Cause Analysis
Incorrect YAML keys or route definitions bring interfaces down or remove default connectivity.
Quick Triage
Use netplan try first to prevent lockout and auto-rollback invalid changes.
Step-by-Step Diagnosis
Validate YAML syntax, renderer choice, and active interface names before applying.

Solution – Primary Fix
Correct YAML for the active NIC, keep gateway and DNS valid, and apply safely.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

Solution – Alternative Approaches
Use out-of-band console in cloud/provider panel to recover from remote lockout.
Verification & Acceptance Criteria
SSH reconnects reliably, routes persist after reboot, and DNS resolution remains stable.
Rollback Plan
Revert to last known-good YAML from backup and run netplan apply from console.
Prevention & Hardening
Always test with netplan try and maintain a console session during network changes.
Related Errors & Cross-Refs
Often linked with Predictable Network Interface naming changes and cloud-init rewrites.
Related tutorial: View the step-by-step tutorial for Ubuntu 22.04 LTS.
View all Ubuntu 22.04 LTS tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Consult Ubuntu 22.04 netplan reference and cloud networking guides.
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.