静看光阴荏苒
不管不顾不问不说也不念

Sshwifty:WebSSH & Telnet客户端

Sshwifty是一个界面很漂亮的WebSSH & Telnet客户端,功能方面也比较全面,可以简单的部署在你的电脑或是服务器上。

作者构建了docker镜像,直接用docker梭哈就行了,首先安装一下需要用到的工具,有docker/nginx/certbot:

pacman -Syy
pacman -S docker nginx-mainline certbot-nginx

启动docker/nginx:

systemctl enable docker nginx
systemctl start docker nginx

我这个系统是archlinux,其他系统安装这些工具的方法可以搜我博客其他的文章里面都有记录。

使用下面的命令启动容器,如果是放到VPS上运行,注意给SSHWIFTY_SHAREDKEY变量设置一个密码:

docker run --name sshwifty -d -e SSHWIFTY_SHAREDKEY=password -p 127.0.0.1:8182:8182 niruix/sshwifty:latest

程序需要SSL证书才能正常工作,所以下面用nginx反代一下。

由于archlinux的nginx与其他发行版的系统有点区别,这里需要多几个步骤。

首先创建两个目录:

mkdir /etc/nginx/sites-available
mkdir /etc/nginx/sites-enabled

然后编辑nginx的主配置文件:

nano /etc/nginx/nginx.conf

在http块内添加如下引用:

http {
    include sites-enabled/*;
}

接着新建一个反代用的配置文件:

nano /etc/nginx/sites-available/ssh.conf

写入如下配置:

server {
    listen 80;
    server_name  ssh.imlala.best; # 换成你的域名
    client_max_body_size 0;

location / {
    proxy_pass                       http://127.0.0.1:8182;
    proxy_buffering                  off;
    proxy_http_version               1.1;
    proxy_set_header Upgrade         $http_upgrade;
    proxy_set_header Connection      "upgrade";
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host            $http_host;
    }
}

做一个软链接:

ln -s /etc/nginx/sites-available/ssh.conf /etc/nginx/sites-enabled/ssh.conf

重载nginx:

systemctl reload nginx

使用certbot签一个ssl证书:

certbot --nginx --agree-tos --no-eff-email --email xxxxx@qq.com

预览:

点+号就可以创建一个SSH会话了:

讲道理,用了一会儿感觉真的很不错:

赞(3)
未经允许不得转载:荒岛 » Sshwifty:WebSSH & Telnet客户端
分享到: 更多 (0)

评论 10

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #1

    建议可以留个源项目的链接

    reizhi4年前 (2020-10-03) Google Chrome 85.0.4183.121 Google Chrome 85.0.4183.121 Windows 10 x64 Edition Windows 10 x64 Edition回复
  2. #2

    大佬,出个这个的教程吧,好东西
    https://github.com/JAVClub/core

    蛤蛤4年前 (2020-10-06) Google Chrome 75.0.3770.100 Google Chrome 75.0.3770.100 Windows 7 x64 Edition Windows 7 x64 Edition回复
    • 挺好的,就是肾受不了。

      LALA4年前 (2020-10-07) Google Chrome 80.0.3987.163 Google Chrome 80.0.3987.163 Windows 10 x64 Edition Windows 10 x64 Edition回复
      • :!: :!:

        蛤蛤4年前 (2020-10-08) Google Chrome 75.0.3770.100 Google Chrome 75.0.3770.100 Windows 7 x64 Edition Windows 7 x64 Edition回复
  3. #3

    这玩意连ipv6小鸡好像有问题 :arrow:

    TITAN3年前 (2020-10-31) Google Chrome 86.0.4240.111 Google Chrome 86.0.4240.111 Windows 10 x64 Edition Windows 10 x64 Edition回复
  4. #4

    大佬,提供一个相关素材 https://github.com/cdr/code-server

    Saiki3年前 (2020-12-21) Microsoft Edge 89.0.731.0 Microsoft Edge 89.0.731.0 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 可以的,我记得还有一个跟这个差不多的好像叫Th什么的。。。

      LALA3年前 (2020-12-24) Google Chrome 86.0.4240.198 Google Chrome 86.0.4240.198 Windows 10 x64 Edition Windows 10 x64 Edition回复
  5. #5

    现在有好多webssh项目, 比如:
    https://github.com/huashengdun/webssh
    https://hub.docker.com/r/jrohy/webssh
    https://hub.docker.com/r/billchurch/webssh2
    https://hub.docker.com/r/shellngn/pro
    https://github.com/nirui/sshwifty

    也有好多免费的容器平台, 像这样的WEBSSH占用流量很少, 放免费平台上也没问题.

    这是一系列教程:
    https://zelikk.blogspot.com/search/label/webssh

    koyeb 平台 和 fly.io 平台可以支持SSH登录到IPv6的VPS
    https://zelikk.blogspot.com/2023/10/github-codespaces-flyio-webssh.html
    https://zelikk.blogspot.com/2023/10/huashengdun-webssh-codesandbox.html

    ǝɔ∀ǝdʎz∀ɹɔ6个月前 (10-05) Firefox 115.0 Firefox 115.0 Windows 10 x64 Edition Windows 10 x64 Edition回复

分享创造快乐

广告合作资源投稿