Changeset 592

Show
Ignore:
Timestamp:
05/29/08 10:52:02 (3 months ago)
Author:
free
Message:

Configure default authorized keys

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • cdd-utils/trunk/debian/changelog

    r590 r592  
    1010  * Disabled pci=nobios for trinity 
    1111  * Set squirrelmail default language 
     12  * Configure default authorized keys 
    1213 
    1314 -- Free Ekanayaka <freee@debian.org>  Fri, 23 May 2008 18:17:25 +0100 
  • cdd-utils/trunk/lib/server.sh

    r591 r592  
    442442} 
    443443 
     444# Do not allow password longins 
     445# 
     446# openssh-server 
    444447sshd () { 
     448 
     449    key=$1 
     450    if nullstr "$key"; then warning "No ssh key given"; return; fi 
     451 
    445452    cfg=/etc/ssh/sshd_config 
    446453    if ! exists $cfg; then warning $cfg not found; return; fi 
    447454    unc_key "PasswordAuthentication" "#" "$cfg" 
    448455    set_key "PasswordAuthentication" " " "no" "$cfg" 
    449 
    450  
     456 
     457    if ! exists "/root/.ssh/authorized_keys"; then 
     458        cp $key /root/.ssh/authorized_keys 
     459    fi 
     460
     461