[GH-ISSUE #239] 【感谢大神做出的贡献】ssh 内网机器求教 #163

Closed
opened 2026-05-05 11:54:07 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @gamelife1314 on GitHub (Jan 21, 2017).
Original GitHub issue: https://github.com/fatedier/frp/issues/239

我在我的具有公网ip的服务器上搭建了frp server(139.149.218.126【假设】),简单配置如下:

[common]
bind_port = 7000
dashboard_port = 7500
dashboard_user = gamelife
dashboard_pwd = nopassword

[ssh]
listen_port = 6000
auth_token = noauthtoken

启动正常:

[root@server-241 frp]# ./frps -c ./frps.ini  
2017/01/21 16:38:02 [main.go:194] [I] Start frps success  
2017/01/21 16:41:47 [control.go:338] [I] ProxyName [ssh], start proxy succes  

我的内网frpc配置如下:

[common]
server_addr = 139.149.218.126
server_port = 7000
auth_token = noauthtoken

[ssh]
local_ip = 192.168.153.130
local_port = 22
use_encryption = true
use_gzip = true

启动正常:

[root 16:40:44 frp]:./frpc -c ./frpc.ini
2017/01/21 16:40:50 [main.go:109] [I] Start frpc success
2017/01/21 16:40:50 [control.go:206] [I] ProxyName [ssh], connect to server [139.129.237.241:7000] success!
2017/01/21 16:40:50 [control.go:220] [I] Start to send heartbeat to frps

我在其他机器上该如何ssh到我的内网机器(192.168.153.130),假设我的内网机器用户名:root,密码:root???

Originally created by @gamelife1314 on GitHub (Jan 21, 2017). Original GitHub issue: https://github.com/fatedier/frp/issues/239 #### 我在我的具有公网ip的服务器上搭建了**frp server(139.149.218.126【假设】)**,简单配置如下: [common] bind_port = 7000 dashboard_port = 7500 dashboard_user = gamelife dashboard_pwd = nopassword [ssh] listen_port = 6000 auth_token = noauthtoken 启动正常: > [root@server-241 frp]# ./frps -c ./frps.ini > 2017/01/21 16:38:02 [main.go:194] [I] Start frps success > 2017/01/21 16:41:47 [control.go:338] [I] ProxyName [ssh], start proxy succes #### 我的内网frpc配置如下: [common] server_addr = 139.149.218.126 server_port = 7000 auth_token = noauthtoken [ssh] local_ip = 192.168.153.130 local_port = 22 use_encryption = true use_gzip = true 启动正常: > [root 16:40:44 frp]:./frpc -c ./frpc.ini > 2017/01/21 16:40:50 [main.go:109] [I] Start frpc success > 2017/01/21 16:40:50 [control.go:206] [I] ProxyName [ssh], connect to server [139.129.237.241:7000] success! > 2017/01/21 16:40:50 [control.go:220] [I] Start to send heartbeat to frps 我在其他机器上该如何ssh到我的内网机器(192.168.153.130),**假设我的内网机器用户名:root,密码:root**???
Author
Owner

@fatedier commented on GitHub (Jan 21, 2017):

文档中有说明 通过 ssh 访问公司内网机器

<!-- gh-comment-id:274268029 --> @fatedier commented on GitHub (Jan 21, 2017): 文档中有说明 [通过 ssh 访问公司内网机器](https://github.com/fatedier/frp/blob/master/README_zh.md#%E9%80%9A%E8%BF%87-ssh-%E8%AE%BF%E9%97%AE%E5%85%AC%E5%8F%B8%E5%86%85%E7%BD%91%E6%9C%BA%E5%99%A8)
Author
Owner

@gamelife1314 commented on GitHub (Jan 22, 2017):

我看了这个但是没配置成功

文档里面是这样写的:

5. 通过 ssh 访问内网机器,假设用户名为 test:

ssh -oPort=6000 test@x.x.x.x

这里的test是frps的用户名还是frpc的,x.x.x.x是谁的IP?我把它改成frpc的连接不上

<!-- gh-comment-id:274301514 --> @gamelife1314 commented on GitHub (Jan 22, 2017): #### 我看了这个但是没配置成功 文档里面是这样写的: > 5. 通过 ssh 访问内网机器,假设用户名为 test: > > ssh -oPort=6000 test@x.x.x.x 这里的**test**是frps的用户名还是frpc的,**x.x.x.x**是谁的IP?我把它改成frpc的连接不上
Author
Owner

@fatedier commented on GitHub (Jan 22, 2017):

去掉错误的答案剩下的就是正确的。

<!-- gh-comment-id:274302755 --> @fatedier commented on GitHub (Jan 22, 2017): 去掉错误的答案剩下的就是正确的。
Author
Owner

@gamelife1314 commented on GitHub (Jan 22, 2017):

我弄好了,初出茅庐,谢谢

ssh -p 6000 local-host-name@pubulic_ip

<!-- gh-comment-id:274303603 --> @gamelife1314 commented on GitHub (Jan 22, 2017): 我弄好了,初出茅庐,谢谢 **ssh -p 6000 local-host-name@pubulic_ip**
Author
Owner

@endokai commented on GitHub (Jan 22, 2017):

ssh的连接信息当然是ssh的...难道映射了还会顺便改掉ssh的密码不成

<!-- gh-comment-id:274326385 --> @endokai commented on GitHub (Jan 22, 2017): ssh的连接信息当然是ssh的...难道映射了还会顺便改掉ssh的密码不成
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#163
No description provided.