πŸ“– ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution – Primary Fix
  7. Solution – Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

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.

Illustrative mockup for ubuntu-22-04-lts β€” netplan-drop-problem
SSH disconnect after netplan apply β€” Illustrative mockup β€” Progressive Robot

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.

Illustrative mockup for ubuntu-22-04-lts β€” netplan-drop-fix
Validated netplan config and restored link β€” Illustrative mockup β€” Progressive Robot

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.

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.