# alpine-sshdX **Repository Path**: ipcun/alpine-sshdX ## Basic Information - **Project Name**: alpine-sshdX - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-11-16 - **Last Updated**: 2025-11-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # About this container This is an alpine sshd container made for X forwarding. Start a local X-server. On a mac you can use XQuartz. Ssh into the container and run your favorite alpine x-app (e.g. firefox) and see it on your local machine. # Usage key based For key based authentication create a volume to keep authorized_keys. ```bash tar cv --files-from /dev/null | docker import - scratch docker create -v /root/.ssh --name ssh-container scratch /bin/true docker cp id_rsa.pub ssh-container:/root/.ssh/authorized_keys ``` Then start the sshd service ```bash docker run -p 4848:22 --name alpine-sshdx --hostname alpine-sshdx --volumes-from ssh-container -d danielguerra/alpine-sshdx ``` * Note user alpine is defined with sudo rights. # Usage password Start the sshd service ```bash docker run -p 4848:22 --name alpine-sshdx --hostname alpine-sshdx -d danielguerra/alpine-sshdx ``` There is one user in the system with sudo rights user:alpine pass:alpine Change the password for alpine ```bash docker exec -ti alpine-sshdx passwd alpine ``` Didn't want key based set a password for root. ```bash docker exec -ti alpine-sshdx passwd ``` # On your workstation After this from your linux X environment or from the Xquartz terminal. See note Xquartz ssh to your new container ```bash ssh -i id_rsa -p 4848 -X root@ ``` For ssh key forwarding use ssh-agent ```bash ssh-agent ssh-add id_rsassh -A -p 4848 -X root@ ssh -C -A -t -X -p 4848 root@ ssh -C -A -t -X -p 777 root@ firefox ``` in the last example the each hop must have the same authorized_keys. # Xquartz note For cmd+v cmd+c e.g. copy/paste to work you need to do this on your mac. ```bash cd ~/ vi .Xdefaults ``` paste this line (without the quotes) `*VT100.translations: #override Meta V: insert-selection(PRIMARY, CUT_BUFFER0) \n` esc :wq Then ```bash xrdb -merge ~/.Xdefaults ``` restart Xquartz and cmd+c and cmd+v works.