I'm interested in trying out more Cloud Native development practices. The first step I'd like to take, is to be able to spin up an arbitrary environment in some Cloud-based hosting, and use a terminal from it. I hope to build on this to enable more rapid software development, without having to set up or maintain a development environment.
Some general notes:
There are a lot of options out there. Here's what I've found so far:
A Node.js application to connect to a host via SSH and display the terminal in the browser. Pretty bare-bones functionality. The documentation is extremely thorough, and has lots of useful setup instructions, even for handling SAML2 logins.
To try out in Docker:
docker run --rm -p 3000:3000 wettyoss/wetty
docker exec -it passwd node
and enter a new password.A C application that shares a TTY on the web. Basically a reimplementation of GoTTY below.
To try out in Docker:
docker run -it --rm -p 7681:7681 tsl0922/ttyd
A Go application that shares a TTY on the web. Has some useful functionality, seems fairly ideal for programmatically opening a terminal on a web port.
This is used by projects like webkubectl and gotty-web-users-Docker. There is a nifty client app for it too.
To try out in Docker:
docker run --rm -it -p 8080:8080 stevelaclasse/gotty-web-ssh /app/gotty -w sh -l
This is a Python app that allows you to SSH to hosts from a web terminal. The default is to give you a web interface to let you connect to an arbitrary host via SSH. However, you can pass URL queries to specify a hostname, username, password, and other default options.
This is definitely the "user-friendly" option if you just have a bastion and need to let users SSH from it. There is a setup guide here.
To try out in Docker:
git clone https://github.com/huashengdun/webssh.git
cd webssh
docker build -t webssh .
docker run --rm -p 8888:8888 --network=host webssh