Cygwin: My O/S is WinXP Pro SP2 and my Cygwin is current as of last night. I would like to start using sshd. I located and read:
http://pigtail.net/LRP/printsrv/cygwin-sshd.html I installed sshd per steps 3-6. sshd works fine when I start it manually, but is broken on reboot: [EMAIL PROTECTED]:~$ ssh localhost ssh_exchange_identification: Connection closed by remote host I think this is the clue: [EMAIL PROTECTED]:~$ cat /var/log/sshd.log 3 [main] sshd 952 fork_copy: linked dll data/bss pass 0 faile d, 0x3DB000..0x3DB050, done 0, windows pid 3484, Win32 error 487 Please see attached files for details. Any suggestions? TIA, David
Verify DOS environment using Command Prompt: C:\>echo %CYGWIN% ntsec tty C:\>path PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\cygwin\bin Start a Cygwin Bash shell. Stop and remove sshd service: [EMAIL PROTECTED]:~$ cygrunsrv -E sshd [EMAIL PROTECTED]:~$ cygrunsrv -R sshd Remove sshd log: [EMAIL PROTECTED]:~$ rm /var/log/sshd.log rm: remove write-protected file `/var/log/sshd.log'? y Install sshd using ssh-host-config script: [EMAIL PROTECTED]:~$ ssh-host-config Overwrite existing /etc/ssh_config file? (yes/no) yes Generating /etc/ssh_config file Overwrite existing /etc/sshd_config file? (yes/no) yes 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 Generating /etc/sshd_config file 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! Start sshd service: [EMAIL PROTECTED]:~$ cygrunsrv -S sshd Test it: [EMAIL PROTECTED]:~$ ssh localhost [EMAIL PROTECTED]'s password: Last login: Sat Nov 27 22:19:44 2004 from 192.168.1.246 [EMAIL PROTECTED]:~$ exit logout Connection to localhost closed. Look at sshd log: [EMAIL PROTECTED]:~$ cat /var/log/sshd.log Reboot. Try to log in: [EMAIL PROTECTED]:~$ ssh localhost ssh_exchange_identification: Connection closed by remote host Look if sshd is running: [EMAIL PROTECTED]:~$ ps -a PID PPID PGID WINPID TTY UID STIME COMMAND 1952 1 1952 1952 ? 18 08:25:36 /usr/bin/cygrunsrv 2044 1 2044 2044 ? 18 08:25:36 /usr/bin/cygrunsrv 196 1952 196 244 ? 18 08:25:37 /usr/sbin/cron 204 2044 204 252 ? 18 08:25:42 /usr/bin/exim-4.43-1 904 1 904 904 ? 18 08:25:40 /usr/bin/cygrunsrv 952 904 952 1012 ? 18 08:25:41 /usr/sbin/sshd 3004 1 3004 3004 0 1003 08:26:11 /usr/bin/bash 3572 3004 3572 3584 0 1003 08:26:41 /usr/bin/ps [EMAIL PROTECTED]:~$ cygrunsrv -Q sshd Service sshd exists Type : Own Process Current State : Running Controls Accepted : Accept Stop Windows Services indicates "CYGWIN sshd" has status "started", Startup Type "Automatic", and Log On As "Local System". /var/log/sshd.log has a clue: [EMAIL PROTECTED]:~$ cat /var/log/sshd.log 3 [main] sshd 952 fork_copy: linked dll data/bss pass 0 failed, 0x3DB000..0x3DB050, done 0, windows pid 3484, Win32 error 487 Windows Task Manager shows no process with PID 3484. Manually stop and start sshd: [EMAIL PROTECTED]:~$ cygrunsrv -E sshd [EMAIL PROTECTED]:~$ cygrunsrv -S sshd [EMAIL PROTECTED]:~$ ssh localhost [EMAIL PROTECTED]'s password: Last login: Sun Nov 28 08:23:05 2004 from localhost
ssh_config
Description: Binary data
ssh-host-config
Description: Binary data
cygcheck.out
Description: Binary data
-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/