> ## Content Index
> Fetch the complete content index at: https://taiwanding.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# HackMyVM 低延遲筆記：德國 VPS 跳板設定指南
- URL: https://taiwanding.com/hackmyvm-di-yan-chi-bi-ji-de-guo-vps-tiao-ban-she-ding-zhi-nan/
- Published: 2025-09-19T03:12:44.000Z
- Updated: 2026-07-15T02:49:51.000Z
- Author: Kevin Chen
- Tags: tool, vps

## 目標

從台灣連 HackMyVM 延遲過高 → 在德國租用 VPS 作為「跳板」，所有連線先送到德國，再由德國連接 HackMyVM，大幅降低延遲、提升穩定性。

---

## 架構

```
本機（Kali） ⇄ 德國 VPS（跳板） ⇄ HackMyVM 目標主機

```

---

## 建立 VPS

- **機房**：德國（Frankfurt / Nuremberg 皆可）
- **作業系統**：Ubuntu 22.04 Server（輕量、穩定）
- **規格建議**：
  - 最低：1-2 vCPU / 2 GB RAM / 20-40 GB SSD
  - 💰 **實際案例**：作者使用 HostKey 德國機房，4 vCPU / 8 GB RAM 規格，每月 NT$168（約 €4.5），當跳板連線的話，效能充足

[Buy VPS Server Hosting | Virtual Server Hosting from €1 | HOSTKEYBuy VPS server hosting for high performance, flexibility, and security. Get started with virtual server hosting from €1/month at HOSTKEY.![](https://taiwanding.com/content/images/icon/favicon-1.svg)HOSTKEY — premium web services provider![](https://taiwanding.com/content/images/thumbnail/hostkey-dedicated-servers-1200x630_4a8ba3bb.jpg)](https://hostkey.com/vps/?ref=taiwanding.com)

![](https://taiwanding.com/content/images/2025/09/image-13.png)

![](https://taiwanding.com/content/images/2025/09/image-14.png)

  - 其他廠商也可以考慮: Netcup、Hetzner
- **SSH 金鑰**：將本機公鑰（`id_ed25519.pub`）加入 VPS 面板的 SSH keys

##  首次登入 & 建立使用者

> 先用 root 或預設帳號（如 ubuntu）登入

在 VPS 上執行：

```bash
# 建立使用者（例：自己的帳號）並賦予 sudo 權限
adduser --disabled-password --gecos "" 自己的帳號
usermod -aG sudo 自己的帳號

# 設定 SSH 公鑰（將本機的 ~/.ssh/id_ed25519.pub 內容貼入）
install -d -m 700 -o 自己的帳號 -g 自己的帳號 /home/自己的帳號/.ssh
cat > /home/自己的帳號/.ssh/authorized_keys
# ← 此時貼上公鑰完整內容，按 Enter 後再按 Ctrl+D 結束輸入
chown 自己的帳號:自己的帳號 /home/自己的帳號/.ssh/authorized_keys
chmod 600 /home/自己的帳號/.ssh/authorized_keys

```

---

## 實戰連線

在本機 Kali 上直接使用 ：

```bash
# 範例：HackMyVM 目標 sophia@venus.hackmyvm.eu，SSH port 5000
ssh -J 自己的帳號@<VPS_IP> -p 5000 sophia@venus.hackmyvm.eu

```

## 快速排錯

| 問題                  | 解決方案                                                               |
| ------------------- | ------------------------------------------------------------------ |
| 連 VPS 仍需密碼          | 檢查公鑰是否正確放置<br>\~/.ssh 權限 700<br>authorized\_keys 權限 600<br>檔案擁有者正確 |
| 連 HackMyVM 需指定 port | 使用 \-p <PORT>（如 \-p 5000）                                          |
| 連線卡住                | 加 \-vvv 查看詳細訊息<br>用 ping/traceroute 確認網路路徑                         |

---

## ✅ 成果

- **直連**：台灣 → HackMyVM = 高延遲、不穩定
- **跳板**：台灣 → 德國 VPS → HackMyVM = 低延遲、穩定流暢
- **成本效益**：每月 NT$168即可大幅改善練習體驗