New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error: dial tcp 127.0.0.1:22: connect: connection refused #4210
Comments
frps.toml 最下方把这个加进去就可以了 allowPorts = [ |
还是一样的报错 |
执行ssh -oPort=6000 test@127.0.0.1 |
客户端上执行 ss -tnlp sport 22 检查端口监听情况 |
admin@hanxiangdong ~ % sudo netstat -an | grep 22 本机的22端口是没有启动 不知道什么原因 |
Bug Description
前提:客户端的防火墙关闭,服务器允许所有端口
问题:服务器连接客户端时,报错error: dial tcp 127.0.0.1:22: connect: connection refused
mac和android(arm64)作为客户端报错都是一样的
frpc Version
0.58.0
frps Version
0.58.0
System Architecture
linux/amd64,mac
Configurations
frpc配置
serverAddr = "180.184.60.200"
serverPort = 7000
auth.token = "12345678"
[log]
level = "debug"
disablePrintColor = true
[[proxies]]
name = "test"
type = "tcp"
localIP = "127.0.0.1"
localPort = 22
remotePort = 6000
#frps配置
bindPort = 7000
auth.method = "token"
auth.token = "12345678"
auth.oidc.issuer = ""
auth.oidc.audience = ""
auth.oidc.skipExpiryCheck = false
auth.oidc.skipIssuerCheck = false
Logs
admin@hanxiangdong frp % go run cmd/frpc/main.go -c ././conf/frpc.toml
2024-05-10 11:08:27.554 [I] [sub/root.go:142] start frpc service for config file [././conf/frpc.toml]
2024-05-10 11:08:27.554 [I] [client/service.go:294] try to connect to server...
2024-05-10 11:08:27.594 [I] [client/service.go:286] [cdc94978a46d35e7] login to server success, get run id [cdc94978a46d35e7]
2024-05-10 11:08:27.595 [I] [proxy/proxy_manager.go:173] [cdc94978a46d35e7] proxy added: [test]
2024-05-10 11:08:27.608 [I] [client/control.go:168] [cdc94978a46d35e7] [test] start proxy success
2024-05-10 11:08:35.916 [D] [proxy/proxy_wrapper.go:260] [cdc94978a46d35e7] [test] start a new work connection, localAddr: 192.168.10.16:57462 remoteAddr: 180.184.60.200:7000
2024-05-10 11:08:35.917 [E] [proxy/proxy.go:206] [cdc94978a46d35e7] [test] connect to local service [127.0.0.1:22] error: dial tcp 127.0.0.1:22: connect: connection refused
2024-05-10 11:10:04.140 [D] [proxy/proxy_wrapper.go:260] [cdc94978a46d35e7] [test] start a new work connection, localAddr: 192.168.10.16:57462 remoteAddr: 180.184.60.200:7000
2024-05-10 11:10:04.141 [E] [proxy/proxy.go:206] [cdc94978a46d35e7] [test] connect to local service [127.0.0.1:22] error: dial tcp 127.0.0.1:22: connect: connection refused
2024-05-10 11:13:09.077 [D] [proxy/proxy_wrapper.go:260] [cdc94978a46d35e7] [test] start a new work connection, localAddr: 192.168.10.16:57462 remoteAddr: 180.184.60.200:7000
2024-05-10 11:13:09.078 [E] [proxy/proxy.go:206] [cdc94978a46d35e7] [test] connect to local service [127.0.0.1:22] error: dial tcp 127.0.0.1:22: connect: connection refused
2024-05-10 11:13:23.180 [D] [proxy/proxy_wrapper.go:260] [cdc94978a46d35e7] [test] start a new work connection, localAddr: 192.168.10.16:57462 remoteAddr: 180.184.60.200:7000
2024-05-10 11:13:23.181 [E] [proxy/proxy.go:206] [cdc94978a46d35e7] [test] connect to local service [127.0.0.1:22] error: dial tcp 127.0.0.1:22: connect: connection refused
Steps to reproduce
1、 在mac上运行 go run cmd/frpc/main.go -c ././conf/frpc.toml 并连接服务端成功
2、在服务器执行ssh -oPort=6000 test@127.0.0.1
Affected area
The text was updated successfully, but these errors were encountered: