云边日落 相顾无相识,长歌怀采薇。 (唐·王绩·野望)
歌曲封面 未知作品
  • 歌曲封面“魔女の宅急便”~ルージュの伝言松任谷由実

渝ICP备2021002886号-1

渝公网安备50022502000591号

网站已运行 3 年 316 天 22 小时 5 分

Powered by Typecho & Sunny

5 online · 40 ms

Title

个人常用脚本

酒笙

·

Article

常用脚本

docker一键安装

♾️ shell 代码:
bash <(curl -sSL https://linuxmirrors.cn/docker.sh)

Linux性能评测

  1. yabs检测脚本
♾️ shell 代码:
curl -sL yabs.sh | bash
  1. superbench检测脚本
♾️ shell 代码:
bash <(wget -qO- https://down.vpsaff.net/linux/speedtest/superbench.sh) --no-geekbench
  1. 融合怪测评脚本
♾️ shell 代码:
curl -L https://gitlab.com/spiritysdx/za/-/raw/main/ecs.sh -o ecs.sh && chmod +x ecs.sh && bash ecs.sh

网络测试

  1. hyperspeed 三网测速
♾️ shell 代码:
bash <(curl -Lso- https://bench.im/hyperspeed)
  1. AutoTrace 三网回程线路显示
♾️ shell 代码:
wget -N --no-check-certificate https://raw.githubusercontent.com/Chennhaoo/Shell_Bash/master/AutoTrace.sh && chmod +x AutoTrace.sh && bash AutoTrace.sh
  1. backtrace 三网回程线路直接显示
♾️ shell 代码:
curl https://raw.githubusercontent.com/zhanghanyun/backtrace/main/install.sh -sSf | sh
  1. Bench 网络带宽及硬盘读写速率
♾️ shell 代码:
wget -qO- bench.sh | bash
  1. SuperBench.sh 网络带宽及硬盘读写速率
♾️ shell 代码:
wget -qO- --no-check-certificate https://raw.githubusercontent.com/oooldking/script/master/superbench.sh | bash

流媒体测试脚本

  1. RegionRestrictionCheck
♾️ shell 代码:
bash <(curl -L -s check.unlock.media)
  1. openai解锁检测
♾️ shell 代码:
bash <(curl -Ls https://github.com/ludashi2020/OpenAI-Checker/raw/main/openai.sh)

Aria2

♾️ shell 代码:
wget -N git.io/aria2.sh && chmod +x aria2.sh && bash aria2.sh

acme免费证书

♾️ shell 代码:
curl https://get.acme.sh | sh

剑皇

♾️ shell 代码:
wget https://cdn.jsdelivr.net/gh/maintell/webBenchmark@releases/download/0.6/webBenchmark_linux_x64 && chmod +x webBenchmark_linux_x64
#执行
./webBenchmark_linux_x64 -c 64 -s http://链接.jpg

v2ray安装

v2ray-agent

♾️ shell 代码:
wget -P /root -N --no-check-certificate "https://raw.githubusercontent.com/mack-a/v2ray-agent/master/install.sh" && chmod 700 /root/install.sh && /root/install.sh

Xray一键安装

♾️ shell 代码:
bash <(wget -qO- -o- https://github.com/233boy/Xray/raw/main/install.sh)

SSH部署

  1. 一键SSH部署
♾️ shell 代码:
curl -o set-ssh.sh "https://rw.qinzhi.xyz/jiusheng6/jiusheng/dev/set-ssh.sh" && chmod +x set-ssh.sh && ./set-ssh.sh
♾️ shell 代码:


#你当然不能使用这个命令啦,因为公钥是我的啦,你需要修改下面脚本,然后自己做链接执行哦
#一定要自己修改哦
#!/bin/bash

# 预期的公钥哈希值
expected_hash="你的文件哈希"

# 确保 ~/.ssh 目录存在
mkdir -p ~/.ssh
chmod 700 ~/.ssh

# 检查本地是否有qinzhi.pub并且哈希正确
if [ -f ~/qinzhi.pub ]; then
    local_hash=$(sha256sum ~/qinzhi.pub | awk '{ print $1 }')  #你需要更改这里的qinzhi.pub为你的公钥
    if [ "$local_hash" == "$expected_hash" ]; then
        echo "本地公钥文件存在且哈希正确,跳过下载步骤。"
        skip_download=true
    fi
fi

# 如果本地没有qinzhi.pub或哈希不正确,则下载
if [ "$skip_download" != true ]; then
    # 检测 wget 是否已安装,如果没有则安装
    if ! command -v wget &> /dev/null
    then
        echo "wget找不到,正在安装..."
        if [ -f /etc/centos-release ] || [ -f /etc/redhat-release ]; then
            sudo yum install wget -y
        elif [ -f /etc/lsb-release ] || [ -f /etc/debian_version ]; then
            sudo apt-get install wget -y
        else
            echo "不支持的系统"
            exit 1
        fi
    fi

    # 使用 wget 下载公钥
    wget --no-check-certificate -O ~/qinzhi.pub '你的公钥存储地址,然后记得前面的qinzhi.pub改为你的'

    # 计算下载文件的哈希值
    downloaded_hash=$(sha256sum ~/qinzhi.pub | awk '{ print $1 }')  #一样的修改qinzhi.pub

    # 比较哈希值
    if [ "$downloaded_hash" != "$expected_hash" ]; then
        echo "哈希值不匹配。该文件可能已损坏或被篡改。"
        exit 1
    fi
fi

# 清空 authorized_keys 并添加新的公钥
cat ~/qinzhi.pub > ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys

# 更新 /etc/ssh/sshd_config
sed -i '/^RSAAuthentication /d' /etc/ssh/sshd_config
sed -i '/^PubkeyAuthentication /d' /etc/ssh/sshd_config
sed -i '/^AuthorizedKeysFile /d' /etc/ssh/sshd_config
sed -i '/^PasswordAuthentication /d' /etc/ssh/sshd_config
echo "# 配置文件" >> /etc/ssh/sshd_config
echo "RSAAuthentication yes" >> /etc/ssh/sshd_config
echo "PubkeyAuthentication yes" >> /etc/ssh/sshd_config
echo "AuthorizedKeysFile .ssh/authorized_keys" >> /etc/ssh/sshd_config
echo "PasswordAuthentication no" >> /etc/ssh/sshd_config

# 重启 SSH 服务
sudo systemctl restart sshd

echo "SSH配置已更新并安装了公钥。"
现在已有 2 条评论,8 人点赞
酒笙
Comment
发表
  1. 头像
    @
    青汁
    😃😃😃你好
    · Windows · Chrome · 中国浙江省移动

    👍

    💖

    💯

    💦

    😄

    🪙

    👍 0 💖 0 💯 0 💦 0 😄 0 🪙 0
  2. 头像
    @
    感谢分享!
    · Windows · Chrome · 中国湖北省武汉市汉阳区移动

    👍

    💖

    💯

    💦

    😄

    🪙

    👍 0 💖 0 💯 0 💦 0 😄 0 🪙 0
搜 索 消 息 足 迹
你还不曾留言过..
你还不曾留下足迹..
博主