Skip to main content

Can’t SSH / RDP

## Troubleshooting SSH (and RDP) connectivity

LXC VPSs are typically managed over **SSH**.  Because containers share the host’s kernel and cannot run Windows, Remote Desktop Protocol (RDP) is generally not applicable.  If you install a desktop environment and an RDP server (such as xrdp) inside your container, the steps for troubleshooting are similar to SSH: verify the network, service and firewall.  Use the following checklist when you cannot connect.

### 1. Verify the IP address and network connectivity

- **Check the container’s IP** – Make sure you are using the correct public IP address assigned to your container (viewable in the client area or via `ip addr` inside the console).
- **Ping the server** – From your local machine, run `ping <IP>` to ensure the container responds.  If pings fail, there may be a network or firewall issue.  Use the provider’s console (VNC/web console) to access the container and verify its network configuration.
- **Check network interface status** – In the console, run `ip link` to see if the network interface is up.  Use `ip link set eth0 up` to enable it if necessary and `dhclient` or static configuration to obtain IP settings.

### 2. Confirm the SSH service is installed and running

- **Install SSH server** – Containers based on minimal images may not include an SSH server.  On Debian/Ubuntu, install it via `sudo apt update && sudo apt install openssh-server`.  For CentOS/AlmaLinux, run `sudo dnf install openssh-server`.
- **Start and enable the service** – Check the service status with `sudo systemctl status ssh` or `sudo systemctl status sshd`.  Start it if stopped: `sudo systemctl start ssh` and enable it on boot: `sudo systemctl enable ssh`.
- **Check the listening port** – By default, SSH listens on port 22.  If you changed it, ensure you specify the custom port when connecting (`ssh -p <port> user@IP`).  On the server, verify the port in `/etc/ssh/sshd_config` (look for the `Port` directive) and restart the service after changes.

### 3. Verify credentials and authentication

- **Username and password** – Make sure you are using the correct credentials provided in the client area.  Linux containers usually use the `root` user and a randomly generated password.  If you changed the password or disabled password login, ensure you have SSH keys configured.
- **SSH keys** – If password authentication is disabled, use an SSH key pair.  Add your public key to `~/.ssh/authorized_keys` inside the container and connect with the corresponding private key using `ssh -i ~/.ssh/id_rsa user@IP`.
- **Host key changed** – If you redeployed the container, your client may warn that the host key has changed.  Remove the old key from `~/.ssh/known_hosts` and try again.

### 4. Check firewall rules

- **Container firewall** – Tools like UFW (Uncomplicated Firewall) or firewalld may block port 22.  View rules with `sudo ufw status` or `sudo firewall-cmd --list-all` and allow SSH: `sudo ufw allow 22` or `sudo firewall-cmd --add-service=ssh --permanent && sudo firewall-cmd --reload`.
- **Provider‑level firewall** – IllusionCloud’s control panel may include firewall rules.  Ensure port 22 (and 3389 if using RDP) is allowed from your IP.
- **Local firewall/ISP** – Confirm that your local network or ISP does not block outbound port 22 or port 3389.

### 5. Using the provider console

If you cannot reach your container over the network, use the **web console** in the control panel to log in.  From there you can review logs (`/var/log/auth.log` and `/var/log/syslog`), adjust configuration files and restart services.  You can also reset the network configuration or regenerate the SSH host keys.

### 6. RDP considerations

LXC containers do not support Windows, so RDP is not available by default.  If you install a Linux desktop environment and an RDP server (for example, xrdp) inside the container, ensure the service is running and port 3389 is open:

- Install the desktop environment (`apt install xrdp xfce4`) and start xrdp (`sudo systemctl enable --now xrdp`).
- Allow TCP port 3389 in the container and provider firewalls.
- Connect using an RDP client (`mstsc` on Windows or `remmina` on Linux) with your container’s IP and credentials.

### Summary

Most SSH connection problems are caused by incorrect IP addresses, disabled SSH services, wrong credentials or blocked ports.  Always verify the network first, then ensure the SSH server is installed and running.  For remote desktop access, remember that LXC containers only support Linux desktop environments; Windows RDP is not available.  Use the provider’s web console to diagnose network or firewall issues and contact support if you still cannot connect.