X11 forwarding with Docker containers
If you want to do X11 forwarding from your container to your host, you can type these simple commands.
Table of Contents
As an example, we are going to forward the Thunar File Manager from a Debian container.
docker run -it --rm -e DISPLAY=172.17.0.1:0.0 debian
- For the DISPLAY variable, run
ip rand look for the IP of
--rmremoves the container when you exit from it.
Inside the container:
apt update apt install -y openssh-server thunar nano
# /etc/ssh/sshd_config # Modify these lines (uncomment if needed) X11Forwarding yes X11UseLocalhost no
mkdir -p /run/sshd /usr/sbin/sshd
# You can add a user if you don't want to ssh # to the container with the root user useradd -m ricardo passwd ricardo
If you want to use root, first add a password to the root, then change this line in
/etc/ssh/sshd_config(uncomment if needed):
From the host:
ssh -X [email protected]
- Use container’s IP.
# Run thunar thunar
docker run -it --rm --net=host -v $HOME/.Xauthority:/root/.Xauthority:rw archlinux
- This could work on containers in which the previous option does not work. Inside the container, run:
In this new series, we are going to explore useful penetration testing utilities from Kali Linux. The main tool (or set of tools) any pen-tester or ethical hacker should know is Metasploit Framework.
Quickemu is a great QEMU-based program to create and run optimised Linux, Windows and macOS virtual machines.
Learn how to install Virtual Machine Manager on your Arch device following a few simple steps.
Jitsi Meet is an open-source video conferencing platform you can install on your server.
A comprehensive list of Linux-related websites sorted by categories.