diff options
Diffstat (limited to 'contrib/cygwin/ssh-host-config')
-rw-r--r-- | contrib/cygwin/ssh-host-config | 55 |
1 files changed, 50 insertions, 5 deletions
diff --git a/contrib/cygwin/ssh-host-config b/contrib/cygwin/ssh-host-config index 70bbafdb7..83eff3a13 100644 --- a/contrib/cygwin/ssh-host-config +++ b/contrib/cygwin/ssh-host-config | |||
@@ -309,7 +309,13 @@ PermitRootLogin yes | |||
309 | IgnoreRhosts yes | 309 | IgnoreRhosts yes |
310 | # Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication | 310 | # Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication |
311 | #IgnoreUserKnownHosts yes | 311 | #IgnoreUserKnownHosts yes |
312 | StrictModes yes | 312 | |
313 | # | ||
314 | # The following setting overrides permission checks on host key files | ||
315 | # and directories. For security reasons set this to "yes" when running | ||
316 | # NT/W2K, NTFS and CYGWIN=ntsec. | ||
317 | StrictModes no | ||
318 | |||
313 | X11Forwarding no | 319 | X11Forwarding no |
314 | X11DisplayOffset 10 | 320 | X11DisplayOffset 10 |
315 | PrintMotd yes | 321 | PrintMotd yes |
@@ -325,12 +331,9 @@ RhostsAuthentication no | |||
325 | # For this to work you will also need host keys in /etc/ssh_known_hosts | 331 | # For this to work you will also need host keys in /etc/ssh_known_hosts |
326 | RhostsRSAAuthentication no | 332 | RhostsRSAAuthentication no |
327 | 333 | ||
328 | # To install for logon to different user accounts change to "no" here | ||
329 | RSAAuthentication yes | 334 | RSAAuthentication yes |
330 | 335 | ||
331 | # To install for logon to different user accounts change to "yes" here | 336 | PasswordAuthentication yes |
332 | PasswordAuthentication no | ||
333 | |||
334 | PermitEmptyPasswords no | 337 | PermitEmptyPasswords no |
335 | 338 | ||
336 | CheckMail no | 339 | CheckMail no |
@@ -438,6 +441,48 @@ then | |||
438 | fi | 441 | fi |
439 | fi | 442 | fi |
440 | 443 | ||
444 | # Create /var/log and /var/log/lastlog if not already existing | ||
445 | |||
446 | if [ -f /var/log ] | ||
447 | then | ||
448 | echo "Creating /var/log failed\!" | ||
449 | else | ||
450 | if [ ! -d /var/log ] | ||
451 | then | ||
452 | mkdir /var/log | ||
453 | fi | ||
454 | if [ -d /var/log/lastlog ] | ||
455 | then | ||
456 | echo "Creating /var/log/lastlog failed\!" | ||
457 | elif [ ! -f /var/log/lastlog ] | ||
458 | then | ||
459 | cat /dev/null > /var/log/lastlog | ||
460 | fi | ||
461 | fi | ||
462 | |||
463 | # On NT ask if sshd should be installed as service | ||
464 | if [ $_nt -gt 0 ] | ||
465 | then | ||
466 | echo | ||
467 | echo "Do you want to install sshd as service?" | ||
468 | if request "(Say \"no\" if it's already installed as service)" | ||
469 | then | ||
470 | echo | ||
471 | echo "Which value should the environment variable CYGWIN have when" | ||
472 | echo "sshd starts? It's recommended to set at least \"ntsec\" to be" | ||
473 | echo "able to change user context without password." | ||
474 | echo -n "Default is \"binmode ntsec tty\". CYGWIN=" | ||
475 | read _cygwin | ||
476 | [ -z "${_cygwin}" ] && _cygwin="binmode ntsec tty" | ||
477 | if cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd -a -D -e "CYGWIN=${_cygwin}" | ||
478 | then | ||
479 | chown system /etc/ssh* | ||
480 | echo | ||
481 | echo "The service has been installed under LocalSystem account." | ||
482 | fi | ||
483 | fi | ||
484 | fi | ||
485 | |||
441 | if [ "${old_install}" = "1" ] | 486 | if [ "${old_install}" = "1" ] |
442 | then | 487 | then |
443 | echo | 488 | echo |