Skip to content

Instantly share code, notes, and snippets.

@mag1art
Last active June 9, 2023 09:30
Show Gist options
  • Save mag1art/f67aabbdd78509700cba180e680e3d09 to your computer and use it in GitHub Desktop.
Save mag1art/f67aabbdd78509700cba180e680e3d09 to your computer and use it in GitHub Desktop.
simple ttyd installer web ssh arm64

how to use

sudo curl https://gist.githubusercontent.com/mag1art/f67aabbdd78509700cba180e680e3d09/raw/bd4092ce077265fc8e02313e5765bf39179f95a1/ttyd.sh | sh
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
cat << 'EOF' >> ttyd.service
[Unit]
Description=TTYD
After=syslog.target
After=network.target
[Service]
ExecStart=/usr/local/bin/ttyd -i eth0 -p 7681 login
Type=simple
Restart=always
User=root
Group=root
[Install]
WantedBy=multi-user.target
EOF
sudo mv ttyd.service /etc/systemd/system/ttyd.service
sudo systemctl enable ttyd
sudo systemctl start ttyd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment