for security, many network admins block port 22 (the normal SSH port), so you can not SSH in or out of a network
so what do you do if you still need to SSH to a remote computer?
install gh cli for your operating system
login to GitHub
gh auth login
once logged in, show all your current Codespaces
gh cs list
SSH (using gh cli) to the Codespace you want
gh cs ssh
Note: your Codespace MUST have the SSH daemon running
you can add ssh to the .devcontainer definition
load this program on the remote server you would like to connect to
ensure that port 8080 (from the example below) is open on the server
for AWS ensure the "security group" has port 8080 and 22 inbound open
example start command:
ttyd -c mr-coxall:password -W -p 8080 bash
fork this Repl.it to your account
use the web client to SSH into your server
use the Google CoLab to create a terminal you can SSH from
sudo apt-get update \
sudo apt-get install -y build-essential cmake git libjson-c-dev libwebsockets-dev \
git clone https://github.com/tsl0922/ttyd.git \
cd ttyd && mkdir build && cd build \
cmake .. \
make && sudo make install \