跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[VPS] [CRP] 抢机必备脚本,快速修改 root 密码

发表于

github 地址: https://github.com/ypq123456789/change-root-password 抢机子自己的手速总是不够快,总是抢不过别人,那只能借助科技的力量了。借助 claude 一晚上弄出来的,枪机必备脚本 Change Root Password ,求鸡腿、求 star !可以拿快过期的机子测试使用,千万不要拿自己用的机子轻易尝试!

Change Root Password

这个脚本用于快速修改 Linux 系统的 root 密码和 SSH 配置,抢机必备。它主要用于临时 VPS 的快速配置,不适用于生产环境或长期使用的个人服务器。

警告

注意: 本脚本只适用于快速改 root 密码抢别人送的 vps ,不适宜用于自用机子,更不适用于生产环境,如果你在自用机子和生产环境上使用本脚本导致无法连接上 ssh ,后果自负!!!

功能

  • 自动更新脚本到最新版本
  • 修改 SSH 配置以允许 root 用户密码登录
  • 生成随机密码或允许用户自定义密码
  • 更改 root 用户密码
  • 重启 SSH 服务以应用更改

使用方法

方法 1:使用 GitHub API (推荐,版本最新,部分机子可能 403 报错)

这种方法会自动获取最新版本的脚本:

curl -s https://api.github.com/repos/ypq123456789/change-root-password/contents/change_root_password.sh | jq -r .content | base64 -d > /root/change-root-password/change_root_password.sh && chmod +x /root/change-root-password/change_root_password.sh && /root/change-root-password/change_root_password.sh

方法 2:直接从 GitHub 下载(版本可能滞后,上面的 403 报错再用这个)

这种方法直接从 GitHub 仓库下载脚本:

curl -s https://raw.githubusercontent.com/ypq123456789/change-root-password/main/change_root_password.sh > /root/change-root-password/change_root_password.sh && chmod +x /root/change-root-password/change_root_password.sh && /root/change-root-password/change_root_password.sh

注意事项

  1. 脚本需要 root 权限运行。
  2. 使用此脚本可能会更改您的 SSH 配置,请确保您了解这些更改的影响。
  3. 在更改密码后,建议在新的 SSH 会话中测试新密码,而不是直接断开当前连接。
  4. 此脚本不适用于生产环境或重要的个人服务器。

贡献

如果您发现任何问题或有改进建议,请创建一个 issue 或提交 pull request 。

Featured Replies

没有可显示的帖子

创建帐户或登录来提出意见

Account

导航

搜索

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.