Affected versions: 14.04 LTS

πŸ“– ~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

SSH authentication succeeds but shell prompt appears after long delay.

Environment & Reproduction

Seen after changes to SSH banners, PAM modules, or reverse DNS behavior.

Root Cause Analysis

Blocking name lookups or slow PAM scripts delay post-auth session creation.

Quick Triage

Test SSH with verbose mode and compare behavior by source IP.

Step-by-Step Diagnosis

Profile sshd logs, PAM stack order, and UseDNS setting impact.

Illustrative mockup for ubuntu-14-04-lts β€” ssh_hang_problem
SSH sessions stall before shell prompt appears β€” Illustrative mockup β€” Progressive Robot

Solution – Primary Fix

Disable expensive checks, tune UseDNS, and simplify PAM execution path.

Still having issues? Our IT Consulting team can diagnose and resolve this for you. Get in touch for a free consultation.

Illustrative mockup for ubuntu-14-04-lts β€” ssh_hang_solution
Optimized SSH and PAM settings restore login speed β€” Illustrative mockup β€” Progressive Robot

Solution – Alternative Approaches

Use bastion access while investigating directory or DNS dependencies.

Verification & Acceptance Criteria

Interactive shell appears quickly and consistently for privileged and normal users.

Rollback Plan

Restore prior sshd_config and PAM files from versioned backups.

Prevention & Hardening

Stage SSH policy changes and monitor authentication latency trends.

Related with GSSAPI timeouts, DNS PTR failures, and PAM LDAP stalls.

Related tutorial: View the step-by-step tutorial for Ubuntu 14.04 LTS.

View all Ubuntu 14.04 LTS tutorials on the Tutorials Hub β†’

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

Consult OpenSSH server and PAM administration manuals.

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.