[GH-ISSUE #2608] ssh login, set allow host, refused #2081

Closed
opened 2026-05-05 13:20:17 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @southfly on GitHub (Oct 8, 2021).
Original GitHub issue: https://github.com/fatedier/frp/issues/2608

Describe the feature request

ssh 登录,设置hosts过滤后,被拒绝。

但是可以在服务端可以看到用户建立一个连接:
2021/10/08 11:10:17 [I] [proxy.go:179] [cf0c0b22ae977ada] [ssh] get a user connection [222.90.61.173:6363]

连接报错:
kex_exchange_identification: Connection closed by remote host

目标服务器和代理服务器都有设置。

Describe alternatives you've considered

vim /etc/hosts.allow

sshd:192.168.132.:allow
sshd:222.90.61.173:allow

vim /etc/hosts.deny

sshd:ALL

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @southfly on GitHub (Oct 8, 2021). Original GitHub issue: https://github.com/fatedier/frp/issues/2608 ### Describe the feature request ssh 登录,设置hosts过滤后,被拒绝。 但是可以在服务端可以看到用户建立一个连接: 2021/10/08 11:10:17 [I] [proxy.go:179] [cf0c0b22ae977ada] [ssh] get a user connection [222.90.61.173:6363] 连接报错: kex_exchange_identification: Connection closed by remote host 目标服务器和代理服务器都有设置。 ### Describe alternatives you've considered vim /etc/hosts.allow ``` sshd:192.168.132.:allow sshd:222.90.61.173:allow ``` vim /etc/hosts.deny ``` sshd:ALL ``` ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:20:17 -06:00
Author
Owner

@southfly commented on GitHub (Oct 8, 2021):

centos7<->centos7
frp_0.37.1_linux_amd64.tar.gz

<!-- gh-comment-id:938322791 --> @southfly commented on GitHub (Oct 8, 2021): centos7<->centos7 frp_0.37.1_linux_amd64.tar.gz
Author
Owner

@blizard863 commented on GitHub (Oct 8, 2021):

提供一些日志信息。

<!-- gh-comment-id:938366301 --> @blizard863 commented on GitHub (Oct 8, 2021): 提供一些日志信息。
Author
Owner

@southfly commented on GitHub (Oct 8, 2021):

frps:

2021/10/08 14:51:01 [I] [root.go:200] frps uses config file: frps_ssh.ini
2021/10/08 14:51:01 [I] [service.go:192] frps tcp listen on 0.0.0.0:7000
2021/10/08 14:51:01 [I] [root.go:209] frps started successfully
2021/10/08 14:51:05 [I] [service.go:449] [200894dcafb25929] client login info: ip [222.90.61.173:6461] version [0.37.1] hostname [] os [linux] arch [amd64]
2021/10/08 14:51:05 [I] [tcp.go:63] [200894dcafb25929] [ssh] tcp proxy listen port [7001]
2021/10/08 14:51:05 [I] [control.go:444] [200894dcafb25929] new proxy [ssh] success
2021/10/08 14:51:13 [I] [proxy.go:179] [200894dcafb25929] [ssh] get a user connection [222.90.61.173:6501]

frpc:

2021/10/08 02:51:05 [I] [service.go:304] [200894dcafb25929] login to server success, get run id [200894dcafb25929], server udp port [0]
2021/10/08 02:51:05 [I] [proxy_manager.go:144] [200894dcafb25929] proxy added: [ssh]
2021/10/08 02:51:06 [I] [control.go:180] [200894dcafb25929] [ssh] start proxy success

ssh client:

PS C:\Users\South> ssh -p 7001 xxx@xxx.xx
kex_exchange_identification: Connection closed by remote host
<!-- gh-comment-id:938392532 --> @southfly commented on GitHub (Oct 8, 2021): frps: ``` 2021/10/08 14:51:01 [I] [root.go:200] frps uses config file: frps_ssh.ini 2021/10/08 14:51:01 [I] [service.go:192] frps tcp listen on 0.0.0.0:7000 2021/10/08 14:51:01 [I] [root.go:209] frps started successfully 2021/10/08 14:51:05 [I] [service.go:449] [200894dcafb25929] client login info: ip [222.90.61.173:6461] version [0.37.1] hostname [] os [linux] arch [amd64] 2021/10/08 14:51:05 [I] [tcp.go:63] [200894dcafb25929] [ssh] tcp proxy listen port [7001] 2021/10/08 14:51:05 [I] [control.go:444] [200894dcafb25929] new proxy [ssh] success 2021/10/08 14:51:13 [I] [proxy.go:179] [200894dcafb25929] [ssh] get a user connection [222.90.61.173:6501] ``` frpc: ``` 2021/10/08 02:51:05 [I] [service.go:304] [200894dcafb25929] login to server success, get run id [200894dcafb25929], server udp port [0] 2021/10/08 02:51:05 [I] [proxy_manager.go:144] [200894dcafb25929] proxy added: [ssh] 2021/10/08 02:51:06 [I] [control.go:180] [200894dcafb25929] [ssh] start proxy success ``` ssh client: ``` PS C:\Users\South> ssh -p 7001 xxx@xxx.xx kex_exchange_identification: Connection closed by remote host ```
Author
Owner

@github-actions[bot] commented on GitHub (Nov 8, 2021):

Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

<!-- gh-comment-id:962714730 --> @github-actions[bot] commented on GitHub (Nov 8, 2021): Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
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#2081
No description provided.