Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/sh
- PASSWORD="somepass"
- LN=$'\n'
- cat <<EOF > /etc/init.d/ssh_installer
- #! /bin/sh
- case "\$1" in
- start)
- yum -y install openssh-server
- /sbin/service sshd start
- passwd << EOF
- $PASSWORD
- $PASSWORD${LN}EOF
- esac
- EOF
- chmod a+x /etc/init.d/ssh_installer
- ln -s ../init.d/ssh_installer etc/rc3.d/S99ssh_installer
- ln -s ../init.d/ssh_installer etc/rc5.d/S99ssh_installer
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement