Changeset 7454


Ignore:
Timestamp:
Jan 31, 2010, 1:20:34 PM (15 years ago)
Author:
richardvm
Message:

Fixed: disable password authentication in ssh, sshtun private key

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2.0/nanobsd/nanobsd/cfg/nanobsd.wleiden

    r7450 r7454  
    206206)
    207207
    208 # Customize nsd
    209 cust_nsd() (
     208# Customize Security
     209cust_security() (
    210210        chroot ${NANO_WORLDDIR} sh -c "chown -R bind /var/db/nsd"
    211211        chroot ${NANO_WORLDDIR} sh -c "chmod u+x /usr/local/etc/rc.d/nsd"
     212        chroot ${NANO_WORLDDIR} sh -c "chmod 400 /usr/local/sshtun/sshkey"
    212213)
    213214
     
    231232cust_disable_ssh_password () {
    232233  chroot ${NANO_WORLDDIR} sh -c "mv /etc/ssh/sshd_config /tmp"
    233   chroot ${NANO_WORLDDIR} sh -c "cat /tmp/sshd_config | sed -e 's/\#PasswordAuthentication\ no/PasswordAuthentication\ no/' > /etc/ssh/sshd_config"
     234  chroot ${NANO_WORLDDIR} sh -c "cat /tmp/sshd_config | sed -e 's/\#UsePAM\ yes/UsePAM\ no/g' > /etc/ssh/sshd_config"
    234235  chroot ${NANO_WORLDDIR} sh -c "rm /tmp/sshd_config"
    235236}
     
    303304customize_cmd cust_set_root_password
    304305customize_cmd cust_apply_nanobsd_patches
    305 customize_cmd cust_nsd
     306customize_cmd cust_security
Note: See TracChangeset for help on using the changeset viewer.