SCP:“主机密钥验证失败。失去连接”尝试将文件从远程服务器复制到WSL时
我在远程服务器上有一个用户,我们将其称为remote_user@remote_server
。
我的WSL2 Ubuntu上也有一个用户,我们称其为wsl_user@localhost>
。
当我尝试使用命令scp -v -o strictKeyChecking = no remote_user@remote_server:/path/to/file.txt wsl_user@&lt< localhost>:/path/path/path/to/directory 在主机上计算机,它要求提供远程服务器的密码(成功进行身份验证),但是
Host key verification failed.
lost connection
当我使用localhost
作为< localhost>
时,它会输出。
我尝试使用主机计算机的IP地址和WSL2实例的IP地址,但两者都挂起,然后进行连接时间
。
PS:我可以进入他们两个。
I have a user at a remote server, let's call it remote_user@remote_server
.
I also have a user on my WSL2 Ubuntu, let's call it wsl_user@<localhost>
.
When I tried to use the command scp -v -o StrictKeyChecking=no remote_user@remote_server:/path/to/file.txt wsl_user@<localhost>:/path/to/directory
on my host computer, it asked for the remote server's password (which successfully authenticates), but then it outputs
Host key verification failed.
lost connection
when I use localhost
as <localhost>
.
I have tried using both the IP address of the host computer and the IP address of the WSL2 instance, but both just hangs, and then does a Connection timed out
.
P.S: I can ssh into both of them.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我以某种方式通过将其分解为较小的命令,又名
Well, I somehow kinda circumvented the problem using by breaking it into smaller commands, aka