I installed Openssh on a couple of Windows 2000 servers with cygwin, using
instructions I found on this web page:
http://pigtail.net/LRP/printsrv/cygwin-sshd.html
That worked fine on some servers, but on one I get an error when I try to
connect to it that says:
"Cannot initialize SFTP protocol. Is the host running a SFTP server?"
and
"Connection has been unexpectedly closed. Server sent command exit
status 1."
The authentication part seems to be working fine, it's only the SFTP part
that doesn't seem to be working. Any suggestions for how to troubleshoot
this would be greatly appreciated.
regards,
michael.
> That worked fine on some servers, but on one I get an error when I try
> to connect to it that says:
>
> "Cannot initialize SFTP protocol. Is the host running a SFTP
> server?"
> and
> "Connection has been unexpectedly closed. Server sent command exit
> status 1."
>
> The authentication part seems to be working fine, it's only the SFTP
> part that doesn't seem to be working. Any suggestions for how to
> troubleshoot this would be greatly appreciated.
Such a problem may happen if the server sends "extra" messages after the
login, e.g. warning you that the password is expiring in 2 weeks. If you
connect to that server with an interactive shell, what do you see after
the login? Are there differences with what you see on a server where SFTP
works?
--
| Carlo Luciano Bianco | ICQ UIN: 109517158 |
|______________________| Home page: <http://web.tiscali.it/clbianco/> |
|GPG DSA/ElG 1024/4096:|_________________________________________________|
|KeyID:0x5324A0DA - Fingerprint:8B00C61034120506111B143DEDBF71B45324A0DA |
Sound like the sftp subsystem settings in sshd_config are wrong. Look for
Subsystem sftp /path/to/sftp-server in sshd_config, make sure the path is
right and sftp-server exists and is executable.
--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
And why are you using sftp? Wouldn't you be better off with scp, or with an
"rsync -e ssh" combination?
This was an excellent suggestion. I had been using the very nice WinSCP
client, but when I connected to the remote host by using the "SSH" command
from the CYGWIN command prompt, I was able to see right away what the
problem was. Those "extra" messages provided just the information I
needed.
Thanks for the hint, Carlo!
regards,
michael.
> "Carlo Luciano Bianco" <clbi...@tiscalinet.it> wrote in message
> news:Xns94B870319C35cl...@127.0.0.1...
>> Such a problem may happen if the server sends "extra" messages after
>> the login, e.g. warning you that the password is expiring in 2 weeks.
>> If you connect to that server with an interactive shell, what do you
>> see after the login? Are there differences with what you see on a
>> server where SFTP works?
>
> This was an excellent suggestion. I had been using the very nice WinSCP
> client,
Me too, that's why I get your same error message one time every 6 months
(which is my password lifetime)... ;-)
> but when I connected to the remote host by using the "SSH"
> command from the CYGWIN command prompt, I was able to see right away
> what the problem was. Those "extra" messages provided just the
> information I needed.
>
> Thanks for the hint, Carlo!
I'm glad it was helpful, Michael!