[scponly] Problems getting Scponly on Cygwin
Roland Krystian Alberciak
ra115 at mail.gatech.edu
Sun Feb 5 12:11:39 EST 2006
Paul Hyder wrote:
> One more question, exactly how is winscp involved in your
> configuraton? (enabled? used to connect with sftp?)
When configuring the software, I enabled winscp support.
When I configure the scponly software with --enable-winscp-compat I notice I
can connect using the ssh program. When I configure the software with
--enable-scp-compat, I notice I get disconnected after connecting using the
ssh program (remember the output I reported with the "incorrect number of
args" message?- well same message).
I think this is because winscp support is interactive and requires an open
connexion to be maintained?
>
> It looks like the location of the sftp-server is hard coded for
> winscp, and the location is not a match to your location.
> (Code wants it to be in /usr/lib or /usr/local/lib.) But I know very
> little about winscp interaction. Hopefully someone else on the list
> can provide more information.
Well- I looked into what you said a little more (the grep commands: one
looks for "/usr/local/lib" and the other for "/usr/lib")
Me at MyComputer ~/scponly-4.6
$ grep -n --color "/usr/local/lib/sftp-server" *
scponly.c:455: char bad_winscp3str[] = "test -x /usr/lib/sftp-server &&
exec /u
sr/lib/sftp-server test -x /usr/local/lib/sftp-server && exec
/usr/local/lib/sft
p-server exec sftp-server";
Binary file scponly.exe matches
Binary file scponly.o matches
Me at MyComputer ~/scponly-4.6
$ grep -n --color -R "/usr/lib/sftp-server" *
scponly.c:455: char bad_winscp3str[] = "test -x /usr/lib/sftp-server &&
exec /u
sr/lib/sftp-server test -x /usr/local/lib/sftp-server && exec
/usr/local/lib/sft
p-server exec sftp-server";
Binary file scponly.exe matches
Binary file scponly.o matches
Unfortunately, CYGWIN puts sftp-server in:
Me at MyComputer ~
$ locate sftp-server
/usr/sbin/sftp-server.exe
Which is not included in the bad_winscp3str character array. Therefore, one
user did the following:
http://www.cygwin.com/ml/cygwin/2005-02/msg00690.html
I too, updated scponly.c:455 to be (though minorly different):
Me at MyComputer ~/scponly-4.6
$ grep -n --color "char bad_winscp3str" *
scponly.c:455: char bad_winscp3str[] = "test -x /usr/sbin/sftp-server &&
exec /
usr/sbin/sftp-server test -x /usr/lib/sftp-server && exec
/usr/lib/sftp-server t
est -x /usr/local/lib/sftp-server && exec /usr/local/lib/sftp-server exec
sftp-s
erver";
Perhaps future versions of this source can add more tests, like the one I
added? It appears to me this is trivial, however. I added it for
completeness.
So after running the software with the flags you mentioned, I got the
following for you:
There are 2 cases I need to mention, which may help in diagnosing.
In each case: The only variation is the value of debuglevel. ./configure was
setup with --with-sftp-server as a flag AND: --enable-winscp-compat,
--enable-scp-compat were flags (tested both variations for each debuglevel).
1. Debuglevel was set to 3
** The connection just closes, as reported in last email.
Me at MyComputer ~
$ sftp -oPort=50801 incoming at localhost
Connecting to localhost...
incoming at localhost's password:
Connection closed
Does this have something to do about if output is generated, it will close
the connection? I *think* I read about that kind of problem somewhere.
2. Debuglevel was set to 0
Me at MyComputer ~
$ sftp -oPort=50801 incoming at localhost
Connecting to localhost...
incoming at localhost's password:
I receive the following error in a popup box:
"This application has failed to start because cygcrypto-0.9.7.dll was not
found. Re-installing the application may fix this problem."
Pushing ok closes the box and reports "Connection closed".
Which is strange because:
Me at MyComputer ~
$ locate cygcrypto-0.9.7.dll
/bin/cygcrypto-0.9.7.dll
After googling around, I have tried to resolve this/debug it by:
1. Cygwinupdate and reinstalling OpenSSL libraries,
http://www.cygwin.com/ml/cygwin/2003-09/msg00895.html
2. rebaseall,
http://www.tishler.net/jason/software/rebase/rebase-2.2.README
3. Tried fixing path variables,
http://www.cygwin.com/ml/cygwin/2005-10/msg00227.html
Haven't had any success. Perhaps you have ran into this problem or know how
to resolve it?
-Krystian.
More information about the scponly
mailing list