First, we see some information from
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.
sftp do all thing over
ssh, so if you want to use
sftp, you must have a successful
ssh connection, in this case, your local machine is a
ssh client and remote machine is
Windows machines do not have a
ssh server, so you can not use
sftp with them. You must have a
ssh server software install in
Windows machine, like winsshd.