mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #907] ssh_exchange_identification: Connection closed by remote host #719
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#719
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @97612336 on GitHub (Aug 29, 2018).
Original GitHub issue: https://github.com/fatedier/frp/issues/907
Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly.
(为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。)
Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST
What version of frp are you using (./frpc -v or ./frps -v)?
0.21.0
What operating system and processor architecture are you using (
go env)?deepin_linux
Configures you used:
#frps.ini
[common]
bind_addr = 0.0.0.0
bind_port = 7000
#frpc.ini
[common]
server_addr = [此处为我的腾讯云公网IP]
server_port = 7000
[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 6000
Steps to reproduce the issue:
1.
2.
3.
Describe the results you received:
ssh_exchange_identification: Connection closed by remote host
Describe the results you expected:
ssh_exchange_identification: Connection closed by remote host
Additional information you deem important (e.g. issue happens only occasionally):
Can you point out what caused this issue (optional)
@cloverzrg commented on GitHub (Aug 31, 2018):
ssh login failed?
@truegate commented on GitHub (Sep 6, 2018):
检查一下是不是在frpc端开启了ssh
@zle1992 commented on GitHub (Mar 7, 2019):
I Meet the same error . How to solve this?
@chenxxpro commented on GitHub (Apr 13, 2019):
我遇到同样的问题,不过已经解决。当时找到这个issue,反馈一下解决过程吧:
场景: frpc 运行在 docker中
frpc-ssh容器,ini指定local_ip = 127.0.0.1, local_port=22。问题:docker所运行容器中并没有sshd进程。所以 ssh_exchange_identification: Connection closed by remote host是指ssh连接到frps跳转服务器,并反向连接到
frpc-ssh容器,如问题所述,容器中并没有ssh服务端,所以SSH无法连接。解决:
如果是docker运行的,注意容器的网络模式。我的是指向宿主机,使用
--network=host容器启动参数;如果是非docker运行,检查ssh服务端进程是否正常运行:
ps aux | grep "sshd";EN:
If your frpc runs in a docker container, make sure the network mode, try add
--network=hostto your container startup arguments.If not docker, check if sshd process is running, by command:
ps aux | grep "sshd".@hbrls commented on GitHub (Apr 8, 2020):
FYI, the above cli in docker-compose.yml is
@skinnyshy commented on GitHub (Oct 26, 2022):
Change 127.0.0.1 to your lan ip
@kktt007 commented on GitHub (Sep 17, 2023):
you did solved my issue.
local_ip should be lan ip... thanks.
@LisirTian commented on GitHub (Aug 16, 2024):
谢谢,我是在Windowsdocker运行,有错误,然后在Linuxdocker运行后可以访问了,谢谢