从 Unix 服务器到 Window 的 sftp

use*_*585 3 sftp window

我正在尝试sftp从 Unix 机器到我的计算机。我正在使用命令:

sftp userid@ipaddr
Run Code Online (Sandbox Code Playgroud)

其中“ipaddr”是我电脑的 IP 地址。但我无法连接。

我尝试使用ftpand sftpg3,但出现此错误Couldn't read packet: Connection reset by peer

如何解决此错误?

cuo*_*glm 7

首先,我们看到一些信息来自man sftp

DESCRIPTION
     sftp is an interactive file transfer program, similar to ftp(1), which
     performs all operations over an encrypted ssh(1) transport.  It may also
     use many features of ssh, such as public key authentication and compres?
     sion.  sftp connects and logs into the specified host, then enters an
     interactive command mode.
Run Code Online (Sandbox Code Playgroud)

sftp把所有的事情都做一遍ssh,所以如果你想使用sftp,你必须有一个成功的ssh连接,在这种情况下,你的本地机器是a ssh client,远程机器是ssh server

默认情况下,Windows机器没有ssh server,因此您不能使用sftp它们。您必须ssh serverWindows机器上安装软件,例如winsshd