The other day I was looking to access my home lab securely from any location without installing VPN’s or other network tunneling hassle. I was interested if I could get a fully capable terminal from a web-browser over SSL. While Guacamole served my purpose to access remote servers via RDP and SSH over a web browser, I am not quite satisfied with how the terminal rendered.
In search of my requirement I came across a creation from Mr.Christopher Jeffrey in the name of
XTERM. Chris’s GIT Repo has a ready to start web service that can be run on a
Since, my goal is to package services into immutable docker containers that can readily be pulled and deployed in short time, I have set out to build a customized docker container of
tty.js service with
ZSH and awesome
Prezto prompt customizations.
The result is now published to Docker Hub as
kalz/zsh_tty docker image.
You may wish to use my docker image or build your own by customizing my GIT Repo
Dockerfile per your liking.
Check out the terminal recording to glance on how to build from my repo as is.
Alternatively, you may readily use my automated image linked to my Git Repo from Docker hub as follows
- Make sure you have docker installed and running
docker pull kalz/zsh_ttyto pull the image from docker hub
- Start the container by running
docker run -p <portofyourchoice>:8080 --hostname <preferredhostname> --name <<nameyourcontainer> -d kalz/zsh_tty
In my case I ran
docker run -p 8080:8080 --hostname bastion --name term -d kalz/zsh_tty
Access your Terminal from latest web browser on
I have setup my Reverse Proxy
Nginx with Basic Auth over SSL to this
location and serve my Terminal!
One caveat is, Copy and Paste may not work in all browsers, however, the fool proof method is to use
tmux style key modes to copy/paste as listed below.
Ctrl + aenters
prefixmode, and in this mode you may use
selectionmode, from here you may position your cursor to desired place using
h/j/k/lkeys and hit
spaceto mark selection using
Ctrl + cto copy selected text.
- Typically you would select a text using a mouse and right-click
Ctrl + vto paste the copied content.
- When you are in
ESCwill return you to normal mode
Shift + PageUpor
Shift + PageDownscrolls the screen content.