support SSH server on windows or not? say FreeSSHd

rubik rubik at sina.com
Fri Jul 25 20:52:34 CDT 2008


Satish Balay <balay <at> fastmail.fm> writes:

> Perhaps you can use cygwin ssh/sshd/hg. They work for me.
> 

thank you.

and,

I found a Freesshd option named "use new console engine".
after I unchecked this option, things changed a little.

First, try a wrong path
---------------------------
C:\>hg --debug clone --ssh "plink.exe -pw a" ssh://a@192.168.10.10/e:/temp/hg
running "plink.exe -pw a a at 192.168.10.10 "hg -R e:/temp/hg serve --stdio""
sending hello command
sending between command
remote: abort: There is no Mercurial repository here (.hg not found)!
abort: no suitable response from remote hg!
---------------------
so HG checked that directory in ssh url and found no repo, done.

then the right place:
-------------------------------------------
C:\>hg --debug clone --ssh "plink.exe -pw a" ssh://a@192.168.10.10/e:/temp/hg1
running "plink.exe -pw a a at 192.168.10.10 "hg -R e:/temp/hg1 serve --stdio""
sending hello command
sending between command
remote: 48
remote: capabilities: unbundle lookup changegroupsubset
remote: 1
destination directory: hg1
sending heads command
requesting all changes
sending changegroup command
adding changesets
add changeset 5317092d37e2
adding manifests
adding file changes
adding c.txt revisions
added 1 changesets with 1 changes to 1 files
resolving manifests
 overwrite False partial False
 ancestor 000000000000 local 000000000000+ remote 5317092d37e2
 c.txt: remote created -> g
getting c.txt
1 files updated, 0 files merged, 0 files removed, 0 files unresolved


----------------------------------------
So, the command can NOT exit here. I had to close the command window by clicking
the cross box righttop.

but I got everything in the repo.


have a look at FreeSSHD log file C:\Program Files\freeSSHd\freesshd.log:

07-26-2008 09:22:04 SSH server started.
07-26-2008 09:22:56 IP 192.168.10.241 SSH connection attempt.
07-26-2008 09:22:56 IP 192.168.10.241 SSH a sucesfully logged on using password.
07-26-2008 09:22:56 Shell service granted to user a.
07-26-2008 09:22:56 IP 192.168.10.241 SSH a disconnected. (*****)
07-26-2008 09:23:28 IP 192.168.10.241 SSH connection attempt.
07-26-2008 09:23:28 IP 192.168.10.241 SSH a sucesfully logged on using password.
07-26-2008 09:23:28 Shell service granted to user a.


-------------------------------------------------------
now let's try push

C:\hg1>hg --debug push --ssh "plink.exe -pw a"
running "plink.exe -pw a a at 192.168.10.10 "hg -R e:/temp/hg1 serve --stdio""
sending hello command
sending between command
remote: 48
remote: capabilities: unbundle lookup changegroupsubset
remote: 1
pushing to ssh://a@192.168.10.10/e:/temp/hg1
sending heads command
searching for changes
sending branches command
examining 9e03ea2d6e72:5317092d37e2
found incomplete branch 9e03ea2d6e72:5317092d37e2
sending between command
narrowing 1:1 5317092d37e2
found new branch changeset 9e03ea2d6e72
found new changesets starting at 9e03ea2d6e72
1 total queries
common changesets up to 5317092d37e2 d35c768734f1
note: unsynced remote changes!
1 changesets found
List of changesets:
d7349f074552220b1df58b2de12a563638e55988
sending unbundle command

------------------------------
so, it stops here.
But, when I checked the repo in 192.168.10.10, 
I found that changesets from 192.168.10.241 was already there.

-----------------
and I tried pull, and it's all the same.

-------------

so ,
when not using ** new console engine **  option in Freesshd, 
you can get HG working in SSH secure mode.
but can not disconnect from ssh server correctly.
you just close your command window by the cross box in right top corner.
or CTRL+C , sometimes.


I don't know if it's a problem of freesshd or HG .
but I think , it just work, and maybe easier than cygwin.
freesshd is pretty much easy.





More information about the Mercurial mailing list