Cygwin SSH server

04/01/2007

To setup the server, run ssh-host-config

fadli@badai ~
$ ssh-host-config
Generating /etc/ssh_host_key
Generating /etc/ssh_host_rsa_key
Generating /etc/ssh_host_dsa_key
Generating /etc/ssh_config file
Privilege separation is set to yes by default since OpenSSH 3.3.
However, this requires a non-privileged account called ’sshd’.
For more info on privilege separation read /usr/share/doc/openssh/README.privsep
.Should privilege separation be used? (yes/no) yes
Warning: The following function requires administrator privileges!
Should this script create a local user ’sshd’ on this machine? (yes/no) yes
Generating /etc/sshd_config file
Added ssh to C:\WINDOWS\system32\drivers\etc\services

Warning: The following functions require administrator privileges!

Do you want to install sshd as service?
(Say “no” if it’s already installed as service) (yes/no) yes

Which value should the environment variable CYGWIN have when
sshd starts? It’s recommended to set at least “ntsec” to be
able to change user context without password.
Default is “ntsec”. CYGWIN=ntsec tty

The service has been installed under LocalSystem account.
To start the service, call `net start sshd’ or `cygrunsrv -S sshd’.

Host configuration finished. Have fun!

To run the server, run net start sshd

fadli@badai ~
$ net start sshd
The CYGWIN sshd service is starting.
The CYGWIN sshd service was started successfully.

To stop the server, run net stop sshd

fadli@badai ~
$ net stop sshd
The CYGWIN sshd service is stopping.
The CYGWIN sshd service was stopped successfully.


Gentoo Rsync Problem

04/01/2007

This morning najib (najib_jedi) post some error to me. his gentoo machine cannot emerge smoothly. somehow it is stuck and this is the error he posted.

sys-libs/libcap/files/libcap-1.10-syscall.patch
io timeout after 180 seconds — exiting
rsync error: timeout in data send/receive (code 30) at io.c(171) [receiver=2.6.8]
rsync: connection unexpectedly closed (3257572 bytes received so far) [generator]
rsync error: error in rsync protocol data stream (code 12) at io.c(465) [generator=2.6.8]

!!! Rsync has not successfully finished. It is recommended that you keep
!!! trying or that you use the ‘emerge-webrsync’ option if you are unable
!!! to use rsync due to firewall or other restrictions. This should be a
!!! temporary problem unless complications exist with your network
!!! (and possibly your system’s filesystem) configuration.

so the keyword i found in the error is rsync error: timeout in data send/receive (code 30). the rsync function is incapable to do his job. this aybe because of the server error or something else. I suspect that the network is too slow is the cause.

my suggestion to him is to increase the RSYNC_TIMEOUT. so rsync have more time to complete his job. so i suggest him to add RSYNC_TIMEOUT=500 in /etc/make.conf. eg as below.

echo RSYNC_TIMEOUT=500 >> /etc/make.conf