为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

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

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

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

《让子弹飞》 周润发、葛优主演2010年动作喜剧电影

员工自述:惊曝大酒店黑幕触目惊心

WPS Office教育考试专用版

你的嘴唇是软的,头发是软的,心也是软的, 可你总是装出一副强硬的样子来

Listary - 快速搜索启动工具,Windows下的Spotlight

点点橙早教盒糟糕使用体验感受(坑)

优化PC端B站(Bilibili)免登录观看体验