Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to sftp from a Unix box to my computer. I'm use the command:

sftp userid@ipaddr

where "ipaddr" is the IP Address of my computer. But I'm unable to connect.

I tried with ftp and sftpg3, but I'm getting this error Couldn't read packet: Connection reset by peer.

How can I troubleshoot this error?

share|improve this question

First, we see some information from man sftp:

     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 ssh server.

By default, 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.

share|improve this answer

SFTP entails communication between two pieces of software. Your sftp command is the client, but there needs to be server software running at the other end as well as network connectivity between you.

Doesn't look like standard Windows ships with SFTP server - the closest is simple FTP in XP Professional.

There are many third-party options however, including free ones. CoreFTP's mini sftp server is a personal favourite for simplicity. Filezilla Server probably wins popularity-wise as the solid (and open-source) choice.

Regarding connectivity, you need to make sure the relevant ports are open at both ends, firewalls allow the traffic, and network configuration (port forwarding etc.) allows communication.

share|improve this answer
FTP Server in Windows XP: pcstats.com/articleview.cfm?articleid=1491&page=2 – benxyzzy Jul 5 '14 at 20:39
In-depth discussion of network configuration: wiki.filezilla-project.org/Network_Configuration – benxyzzy Jul 5 '14 at 20:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.