1  #!/bin/bash
   2  # Minimal SSH Server Setup + Wi-Fi
   3  # Run once after fresh Ubuntu Server install on Dell
   4  
   5  # --- Change these to your Wi-Fi credentials ---
   6  WIFI_NAME="YourWiFiName"
   7  WIFI_PASS="YourWiFiPassword"
   8  # -----------------------------------------------
   9  
  10  sudo nmcli dev wifi connect "$WIFI_NAME" password "$WIFI_PASS"
  11  sudo apt update
  12  sudo systemctl enable --now ssh
  13  sudo systemctl mask sleep.target suspend.target hibernate.target
  14  echo "[Login]
  15  HandleLidSwitch=ignore" | sudo tee /etc/systemd/logind.conf.d/nolid.conf
  16  sudo systemctl restart systemd-logind
  17  
  18  echo ""
  19  echo "SSH Ready: ssh $(whoami)@$(hostname -I | awk '{print $1}')"
  20