为ipv6 only vps配置web ssh

下载ttyd

wget -O ttyd https://github.com/tsl0922/ttyd/releases/download/1.6.3/ttyd.x86_64

chmod +x ttyd

mv ttyd /usr/sbin

配置开机自启动服务,编辑/etc/systemd/system/ttyd.service,填入(其中ktsee:ktsee为用户名和密码)

[Unit]

Description=ttyd

After=network.target

[Service]

ExecStart=/usr/sbin/ttyd -c ktsee:ktsee bash

[Install]

WantedBy=multi-user.target

设置开机自启动

systemctl start ttyd

systemctl enable ttyd

配置nginx

location ~ ^/ttyd(.*)$ {

proxy_http_version 1.1;

proxy_set_header Host $host;

proxy_set_header X-Forwarded-Proto $scheme;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_set_header Upgrade $http_upgrade;

proxy_set_header Connection "upgrade";

proxy_pass http://127.0.0.1:7681/$1;

}

评论

Popular Posts

《普列姆昌德作品选》

Cromite - 极度注重隐私的Chromium浏览器

常用的国内外延迟测速链接(generate_204)

随身WiFi折腾指南: 解锁、刷机与DIY

JavaScript版星际争霸(网页版星际争霸)

伤不起的盖茨比——那些年,我们没逆袭到的女神

机动战士高达SEED 機動戦士ガンダムSEED (2002)

让你一生都受用的85句话 (适合做QQ签名)

eMule eXcalibur 1.85.3 简体中文版(风之痕)

WinRAR 7.13 官方简体中文无广告版