# Netcup SCP Rescue System Guide: SSH Key Recovery, growpart NVMe Resize & LUKS2 Encryption

> Master Netcup SCP Rescue System: reset lost root SSH access via chroot, expand NVMe partitions without downtime after plan upgrades, and set up LUKS2 SSH unlock.

- Canonical URL: https://euserverlab.com/guides/netcup-scp-rescue-system-luks-disk-resize-guide/
- Language: en
- Published: 2026-11-11 | Updated: 2026-11-22
- Publisher: EUServerLab (https://euserverlab.com/methodology/)

## Key Findings (TL;DR)
- Netcup SCP boots an out-of-band Debian live Rescue System in RAM — letting you mount /dev/vda, fix broken fstab/SSH configs via chroot, or run offline fsck even when your guest OS refuses to boot.
- After upgrading a tariff in CCP (for example RS 1000 128 GB -> RS 2000 256 GB NVMe), expand the partition and ext4/xfs filesystem online in 15 seconds using growpart and resize2fs after taking a €0 SCP snapshot.
- For strict GDPR / compliance workloads on KVM, encrypt your root partition with LUKS2 and unlock it remotely at boot via dropbear-initramfs over SSH.
- Always create a €0 SCP snapshot BEFORE resizing partitions or regenerating initramfs for a 1-click rollback (x86 Root-Servers and x86 VPS support live online Copy-on-Write snapshots, whereas ARM64 VPS G12.5 requires an Offline Snapshot with the VM stopped first).

## Execution Checklist
1. **Take a €0 SCP Snapshot Before Touching Block Devices**: Open SCP -> Snapshots and create a rollback image before editing partitions, GRUB, or LUKS headers (live online CoW snapshot on x86 RS/VPS; offline snapshot after stopping the VM on ARM64 VPS).
2. **Power-Cycle via SCP & Expand Partition Online with growpart**: After a tariff upgrade, stop and start the VM from SCP so /dev/vda updates, then run growpart /dev/vda X and resize2fs.
3. **Use SCP Rescue System + chroot for Emergency SSH/fstab Recovery**: Enable Rescue System in SCP, connect with the temporary root password shown on screen, mount /dev/vdaX to /mnt, and chroot in.

---

Whether you locked yourself out of SSH while hardening `sshd_config`, upgraded from [RS 1000 G12.5](/models/rs-1000-g12-5/) (`128 GB`) to [RS 2000 G12.5](/models/rs-2000-g12-5/) (`256 GB` NVMe) and wonder why `df -h` still shows `128 GB`, or need **LUKS2 full-disk encryption** for sensitive European customer data, Netcup's **Server Control Panel (SCP)** gives you bare-metal-style out-of-band recovery tools.

## 1. Emergency SSH / Root Recovery via SCP Rescue System (`chroot`)

If a bad `/etc/fstab` mount, broken `ufw`/`nftables` rule, or lost SSH key prevents boot or login:

1. Log in to **SCP (`servercontrolpanel.de`) → Select Server → `Rescue`** and click **Activate Rescue System** (copy the temporary one-time `root` password displayed in SCP, then trigger a power cycle).
2. SSH into your server's IP as `root`, inspect your partition layout with `lsblk -f`, and mount your root partition cleanly into `/mnt`:

```bash
# 1. Inspect partitions (typically /dev/vda2 or /dev/vda3 on Debian/Ubuntu G12.5 images)
lsblk -f

# 2. Mount root filesystem & bind virtual kernel filesystems for chroot
mount /dev/vda2 /mnt
for dir in dev dev/pts proc sys run; do mount --bind "/$dir" "/mnt/$dir"; done
chroot /mnt /bin/bash

# 3. Repair authorized_keys, reset password, or fix /etc/fstab / sshd_config
passwd root
sshd -t   # Validate SSH config syntax before rebooting!
exit

# 4. Unmount cleanly & reboot back into normal disk boot (Rescue auto-disables after 1 boot)
umount -R /mnt
reboot
```

## 2. Non-Destructive NVMe Expansion After a Tariff Upgrade (`growpart`)

When you upgrade a Netcup VPS or Root-Server to a larger tier in CCP, two steps are mandatory before Linux sees the extra NVMe capacity:

1. **Create a `€0` SCP Snapshot** (live online CoW snapshot on x86 Root-Servers and x86 VPS; on `VPS 500–8000 ARM G12.5`, create an **Offline Snapshot** by stopping the VM first), then perform a **full `Stop` + `Start` inside SCP** (a warm `sudo reboot` inside SSH does **not** re-initialize the QEMU VirtIO block size!).
2. Once `lsblk` shows the larger `/dev/vda` size, expand your root partition and filesystem online with zero data loss:

```bash
sudo apt update && sudo apt install -y cloud-guest-utils

# Check which partition number holds '/' (e.g. vda2 or vda3)
lsblk

# Expand partition 2 to fill 100% of new /dev/vda capacity (note the space before '2'!)
sudo growpart /dev/vda 2

# Resize ext4 online (if running XFS instead, run: sudo xfs_growfs /)
sudo resize2fs /dev/vda2
df -h /
```

## 3. GDPR / Compliance Hardening: LUKS2 Full-Disk Encryption with Remote SSH Unlock

For workloads storing regulated PII, healthcare, or client secrets, combining a minimal Debian custom ISO install (LUKS2 root volume) with **`dropbear-initramfs`** lets you unlock the encrypted NVMe drive remotely over SSH at boot—without logging into the SCP web VNC console:

```bash
# Inside your LUKS2-installed Debian 12 system:
sudo apt update && sudo apt install -y dropbear-initramfs

# 1. Listen on port 2222 (avoids host-key conflict with OpenSSH on port 22) & disable password auth
sudo sed -i 's/^#*DROPBEAR_OPTIONS=.*/DROPBEAR_OPTIONS="-I 180 -j -k -p 2222 -s -c cryptroot-unlock"/' \
  /etc/dropbear/initramfs/dropbear.conf

# 2. Add your workstation Ed25519 public key to initramfs Dropbear
cat ~/.ssh/authorized_keys | sudo tee /etc/dropbear/initramfs/authorized_keys >/dev/null
sudo chmod 600 /etc/dropbear/initramfs/authorized_keys

# 3. Bind static IPv4 in initramfs.conf for custom ISO installs (replace client IP, gateway, netmask & NIC)
sudo sed -i '/^IP=/d' /etc/initramfs-tools/initramfs.conf
echo 'IP=203.0.113.42::203.0.112.1:255.255.252.0:netcup-luks:ens3:off' \
  | sudo tee -a /etc/initramfs-tools/initramfs.conf >/dev/null

# 4. Rebuild initramfs (remember to allow TCP 2222 from your admin IP in SCP Firewall!)
sudo update-initramfs -u -k all
```

On reboot, simply run `ssh -p 2222 root@YOUR_SERVER_IP`, enter your LUKS2 passphrase at the prompt, and the boot sequence immediately hands off to your hardened Debian runtime (see our [Docker & SCP Firewall Guide](/guides/docker-ipv6-ufw-firewall-netcup-setup-guide/) and [SCP REST API Snapshot Guide](/guides/netcup-scp-rest-api-dns-automation-guide/)).

## Frequently Asked Questions

### Does booting the Netcup SCP Rescue System wipe my NVMe data?

No. Activating the Rescue System in SCP boots a temporary live Linux environment purely inside RAM while leaving your virtual NVMe disk (/dev/vda) untouched and unmounted until you mount it manually.

### Why didn't my disk size increase inside df -h after upgrading from RS 1000 to RS 2000?

After upgrading your plan in CCP and performing a full stop/start power cycle in SCP (a warm reboot inside Linux is not enough to refresh QEMU block geometry), the underlying /dev/vda block device grows, but you must expand the partition table (growpart) and filesystem (resize2fs or xfs_growfs) to claim the unallocated space.

### Can I unlock a LUKS2 full-disk encrypted Netcup server without opening the SCP KVM browser console every reboot?

Yes. Install dropbear-initramfs on Debian/Ubuntu, place your admin Ed25519 SSH public key in /etc/dropbear/initramfs/authorized_keys, bind a static IP in /etc/initramfs-tools/initramfs.conf, and run cryptroot-unlock over SSH on a custom port (e.g. 2222) during boot.

---
Source: EUServerLab (https://euserverlab.com/guides/netcup-scp-rescue-system-luks-disk-resize-guide/) | Open Telemetry Dataset: https://euserverlab.com/benchmarks/vps-500-g12-5.json
