Don't know how to set it up? Install Codex on both your server and computer (if you don't know how, ask GPT; just type commands in the terminal). Then paste this document into Codex and let it configure everything for you. If you really can't figure it out, just contact me: telegram=https://t.me/desci0 x=https://x.com/123olp (P.S.: Paid setup service available)
Before deploying the FRP server and client, please ensure you have the following environment and tools. These prerequisites are necessary for the FRP tunnel to function correctly.
Purpose: To act as the FRP server (frps), providing a fixed access point for your Windows computer.
Purpose: To act as the FRP client (frpc), automatically connecting to AWS regardless of the network it's on.
Official Repository Address:
https://github.com/fatedier/frp
Version used in this deployment:
frp_0.58.1
Download Page:
https://github.com/fatedier/frp/releases
Needed to download:
Installation Path:
Settings → Apps → Optional features → Add a feature
Purpose: Provides SSH login capability, allowing FRP to forward SSH to Windows.
You must use Termius to generate the SSH private key (because you've enabled "key-only login").
Official Download:
https://termius.com
The following ports must be open in the AWS Security Group:
| Port | Purpose | Required | | :---------------------------------------- | :------------------------- | :------- | | FRP Control Port (e.g., 1234 or 114514) | frpc → frps connection | ✔ Required | | SSH Mapping Port (e.g., 12345 or 114515) | Termius → Windows SSH | ✔ Required |
If using UFW (Ubuntu Firewall), also need:
sudo ufw allow <FRP Control Port>/tcp
sudo ufw allow <SSH Mapping Port>/tcp
You need to prepare in advance:
authorized_keys)This deployment has disabled password login, so the private key must be kept secure, otherwise you will not be able to log in to Windows.
Needs knowledge of the following basic commands (very simple):
cd /path
nano / vim / notepad
chmod / chown
ps -ef | grep
ss -lnpt
nohup <cmd> &
tail -f
All covered in your document, no extra requirements.
Must have:
- AWS EC2 (Ubuntu, with public IP)
- Windows computer (OpenSSH Server installed)
- Termius (for SSH + key generation)
- FRP (Download Linux + Windows versions)
- AWS security group has FRP control port and SSH mapping port open
- Termius generated SSH key pair
As long as the above prerequisites are met, your FRP tunnel, SSH key login, and cross-network remote access to your computer will 100% work correctly.
If you wish, I can also help you:
Let me know if you need any of these!
This guide documents the FRP server configuration and operation methods on the current AWS EC2 (Ubuntu) instance, for future maintenance or reconstruction.
/home/ubuntu/.frpfrp_0.58.1_linux_amd64/home/ubuntu/.frp/frp_0.58.1_linux_amd64/frps/home/ubuntu/.frp/frp_0.58.1_linux_amd64/frps.ini/home/ubuntu/.frp/frps.log/home/ubuntu/.frp/start_frps.shbind_port = 123412345123456Create directory and download FRP:
mkdir -p /home/ubuntu/.frp
cd /home/ubuntu/.frp
wget https://github.com/fatedier/frp/releases/download/v0.58.1/frp_0.58.1_linux_amd64.tar.gz
tar -zxf frp_0.58.1_linux_amd64.tar.gz
Create configuration /home/ubuntu/.frp/frp_0.58.1_linux_amd64/frps.ini:
[common]
bind_port = 1234
token = 123456
Write startup script /home/ubuntu/.frp/start_frps.sh (ready):
#!/usr/bin/env bash
set -euo pipefail
BASE_DIR="$(cd "$(dirname "$0")" && pwd)"
FRP_DIR="$BASE_DIR/frp_0.58.1_linux_amd64"
FRPS_BIN="$FRP_DIR/frps"
CONFIG_FILE="$FRP_DIR/frps.ini"
LOG_FILE="$BASE_DIR/frps.log"
if ! [ -x "$FRPS_BIN" ]; then
echo "frps binary not found at $FRPS_BIN" >&2
exit 1
fi
if ! [ -f "$CONFIG_FILE" ]; then
echo "Config not found at $CONFIG_FILE" >&2
exit 1
fi
PIDS=$(pgrep -f "frps.*frps\.ini" || true)
if [ -n "$PIDS" ]; then
echo "frps is running; restarting (pids: $PIDS)..."
kill $PIDS
sleep 1
fi
echo "Starting frps with $CONFIG_FILE (log: $LOG_FILE)"
cd "$FRP_DIR"
nohup "$FRPS_BIN" -c "$CONFIG_FILE" >"$LOG_FILE" 2>&1 &
sleep 1
PIDS=$(pgrep -f "frps.*frps\.ini" || true)
if [ -n "$PIDS" ]; then
echo "frps started (pid: $PIDS)"
else
echo "frps failed to start; check $LOG_FILE" >&2
exit 1
fi
Start/Restart:
cd /home/ubuntu/.frp
bash ./start_frps.sh
Check process: ps -ef | grep frps
Check listening: ss -lnpt | grep 1234
View logs: tail -n 50 /home/ubuntu/.frp/frps.log
Stop (if manual): pkill -f "frps.*frps.ini"
099756caee) needs to open inbound TCP 1234 (FRP control) and 12345 (SSH mapping).If using ufw, execute:
sudo ufw allow 1234/tcp
sudo ufw allow 12345/tcp
frpc.ini, server_addr points to this EC2 public IP, server_port=1234, remote_port=12345, token matches server.ssh lenovo@<AWS IP> -p 12345, authentication method is key (private key generated by Termius Keychain).start_frps.sh can be registered as a systemd service to ensure automatic startup after instance reboot.frps.log for abnormal connections or errors, and ensure the token is not leaked.Last Updated: 2025-12-05 Applicable Environment: Windows 10/11, user lenovo, OpenSSH Server already installed on this machine.
I. Directories and Files
II. frpc.ini Content (currently effective) [common] server_addr = 13.14.223.23 server_port = 1234 token = 123456
[ssh] type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port = 12345
III. Startup and Autostart 1) Manual foreground verification (optional) PowerShell: cd C:\frp .\frpc.exe -c frpc.ini
2) Background quick start Double-click C:\frp\start_frpc.bat
3) Startup autostart (simple way) Copy start_frpc.bat to the Startup folder: C:\Users\lenovo\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup Automatically starts in the background on next login.
IV. SSH Connection Method
Terminal command: ssh -i "C:\Users\lenovo.ssh\666" -p 12345 lenovo@13.14.223.23
Termius entry: Host 13.14.223.23 Port 12345 User lenovo Key Select C:\Users\lenovo.ssh\666 (no passphrase)
V. Permissions and Security
VI. Common Checks
VII. Troubleshooting Quick Reference
Termius (Mobile) Connection Steps:
One-click startup command (execute in current administrator PowerShell)
Add-MpPreference -ExclusionPath "C:\frp" Unblock-File C:\frp\frpc.exe cd C:\frp .\frpc.exe -c frpc.ini
If you want to start in the background (without occupying a window):
cd C:\frp Start-Process -FilePath ".\frpc.exe" -ArgumentList "-c frpc.ini" -WindowStyle Hidden
Need autostart on boot (highest privilege):
schtasks /Create /TN "FRPClient" /TR "C:\frp\frpc.exe -c C:\frp\frpc.ini" /SC ONLOGON /RL HIGHEST /F /RU lenovo