Changeset 577

Show
Ignore:
Timestamp:
05/27/08 11:04:22 (6 months ago)
Author:
free
Message:

* Disable password authentication in sshd

Location:
cdd-utils/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • cdd-utils/trunk/debian/changelog

    r574 r577  
    1 cdd-utils (0.9.1) 64studio; urgency=low 
     1cdd-utils (0.9.2) 64studio; urgency=low 
    22 
    33  * Fixed missing semicolon in dhclient 
    44  * Changed API hostname to fqdn 
     5  * Disable password authentication in sshd 
    56 
    67 -- Free Ekanayaka <freee@debian.org>  Fri, 23 May 2008 18:17:25 +0100 
  • cdd-utils/trunk/lib/common.sh

    r545 r577  
    4949    sed -i -e "\|^$key| d" $cfg 
    5050} 
     51unc_key () { 
     52    key="$1" 
     53    com="$2" 
     54    cfg="$3" 
     55    sed -i -e "s|^${com}.*${key}\(.*\)|${key}\1|g" $cfg 
     56} 
    5157ldap_set () { 
    5258    dn="$1" 
  • cdd-utils/trunk/lib/server.sh

    r565 r577  
    432432    touch /etc/resolv.conf 
    433433} 
     434 
     435sshd () { 
     436    cfg=/etc/ssh/sshd_config 
     437    if ! exists $cfg; then warning $cfg not found; return; fi 
     438    unc_key "PasswordAuthentication" "#" "$cfg" 
     439    set_key "PasswordAuthentication" " " "no" "$cfg" 
     440} 
     441