I am hitting a Protocol error while trying to SFTP from one server to another. I have tried to search up Google to no avail. May i know if anyone can help me with this.

rel@kingfisher:/kingfisher_bft/hme/rel>  sftp relst@
Need basic cursor movement capability, using vt100
error: Could not open connection to `rel@': Protocol error

The machine you are using to sftp into the remote machine seems to be missing the ncurses libraries. Install them with apt-get install libncurses5 or download them from your distributions web-page.

[ From: http://ftp.vim.org/security/ssh/README.SSH2 ]

If your sftp2 complains something like this: "Need basic cursor movement capability, using vt100", then no library containing tgetent() function was found when you ran ./configure . If you have a Linux system, then that is probably because you don't have either termcap-devel or ncurses-devel packages installed. If you want to get rid of the message, and/or to use some more exotic terminals capabilities, you should install either package. (A good place to look for those is your distribution's web-page.)

  • thanks for the insights Stuffy. Could i also mention that the machine that is trying to SFTP to remote machines has no problem with other remote machines as i have tried. But the remote machine having problem is not having any issue accepting SFTP from machine... Oct 16 '12 at 8:06
  • Make sure you have the ncurses-libs on both servers. Also, try logging in with another user, and test if you can sftp from the remote server into the "kingfisher" server. And it would be useful to know what distribution you are using.
    – Stuffy
    Oct 16 '12 at 8:17

SFTP is a subsystem of the SSH protocol, and has its own protocol. Actually there are 7 SFTP protocol versions (from 0 to 6) and 2 SSH protocol versions (SSH-1 and SSH-2).

What I see here above looks like the client and the server are unable to negotiate a common protocol, and this could be due to several reasons:

  • the client tries a SSH-2 connection to a server that only supports SSH-1
  • the client tries a SFTP protocol version that is not supported by the server
  • unlikely: the client tries to negotiate encryption/MAC algorithms that are unsupported by the server
  • In any case, I would research for the root cause of this issue on the server side.

    Your Answer

    By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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