Enhance SSH configuration in setup script with safer settings and backup restoration. Add recovery instructions for broken SSH service to README. Improve logging and error handling during SSH service restart.

This commit is contained in:
2025-09-05 13:01:40 +01:00
parent c1951eec11
commit 84ff4b318e
3 changed files with 179 additions and 35 deletions

View File

@@ -233,6 +233,18 @@ Take a system snapshot before running the script if running on a virtual machine
3. Check SSH client configuration
4. Use verbose mode: `ssh -v sysadmin@server-ip`
### SSH Service Broken
If the setup script breaks SSH service, you can recover:
1. Access the server via console (not SSH)
2. Download the recovery script:
```bash
wget -O fix-ssh.sh "https://del-c.net/deb12-fix"
chmod +x fix-ssh.sh
su -
./fix-ssh.sh
```
3. The script will restore from backup or create a basic working configuration
### Firewall Issues
1. Check UFW status: `sudo ufw status`
2. Verify port 22 is allowed: `sudo ufw status numbered`