[root@internal-sshserver ~]# systemctl daemon-reload [root@internal-sshserver ~]# systemctl restart frpc.service [root@internal-sshserver ~]# systemctl status frpc.service ● frpc.service - FRP Client Service Loaded: loaded (/etc/systemd/system/frps.service; disabled; preset: disabled) Active: active (running) since Fri 2025-04-25 16:29:13 CST; 14s ago Main PID: 94421 (frpc) Tasks: 4 (limit: 12140) Memory: 4.6M CPU: 7ms CGroup: /system.slice/frpc.service └─94421 /usr/local/bin/frp/frpc -c /usr/local/bin/frp/frpc.toml
Apr 25 16:29:13 internal-sshserver systemd[1]: Started FRP Client Service. Apr 25 16:29:13 internal-sshserver frpc[94421]: 2025-04-25 16:29:13.467 [I] [sub/root.go:149] start frpc service for config file [/usr/local/bin/frp/frpc.toml] Apr 25 16:29:13 internal-sshserver frpc[94421]: 2025-04-25 16:29:13.467 [I] [client/service.go:314] try to connect to server... Apr 25 16:29:13 internal-sshserver frpc[94421]: 2025-04-25 16:29:13.472 [I] [client/service.go:306] [66f9a7e320b717cd] login to server success, get run id [66f9a7e320b717cd] Apr 25 16:29:13 internal-sshserver frpc[94421]: 2025-04-25 16:29:13.472 [I] [proxy/proxy_manager.go:177] [66f9a7e320b717cd] proxy added: [ssh] Apr 25 16:29:13 internal-sshserver frpc[94421]: 2025-04-25 16:29:13.473 [I] [client/control.go:172] [66f9a7e320b717cd] [ssh] start proxy success
ok,从下面的输出看,和服务器连接成功了
如果token和服务器不一致,将报告以下错误
1 2 3 4 5 6
2025-04-25 16:31:36.210 [I] [sub/root.go:149] start frpc service for config file [./frpc.toml] 2025-04-25 16:31:36.210 [I] [client/service.go:314] try to connect to server... 2025-04-25 16:31:36.216 [E] [client/service.go:299] token in login doesn't match token from configuration 2025-04-25 16:31:36.216 [W] [client/service.go:317] connect to server error: token in login doesn't match token from configuration 2025-04-25 16:31:36.216 [I] [sub/root.go:167] frpc service for config file [./frpc.toml] stopped login to the server failed: token in login doesn't match token from configuration. With loginFailExit enabled, no additional retries will be attempted
PS C:\Users\Xiaohui> ssh root@你的frp公网IP -p6000 The authenticity of host '你的frp公网IP (你的frp公网IP)' can't be established. ED25519 key fingerprint is SHA256:D2EEPcJ8l2BhE6E/V9qNCUriU/njD2jPZMxl7GNMuYs. This host key is known by the following other names/addresses: C:\Users\Xiaohui/.ssh/known_hosts:11: [你的frp公网IP]:6000 Are you sure you want to continue connecting (yes/no/[fingerprint])? root@你的frp公网IP's password: Activate the web console with: systemctl enable --now cockpit.socket
Last login: Fri Apr 2515:34:402025 from 144.34.235.12 [root@internal-sshserver ~]#