Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- ### BEGIN INIT INFO
- # Provides: ssh-host-keys
- # Required-Start:
- # Required-Stop:
- # Default-Start: 2 3 4 5
- # Default-Stop:
- # Short-Description: Regenerates SSH host keys on first boot.
- ### END INIT INFO
- service ssh stop > /dev/null 2>&1
- rm -f /etc/ssh/ssh_host_*
- dpkg-reconfigure openssh-server
- update-rc.d ssh defaults > /dev/null 2>&1
- update-rc.d -f ssh-host-keys remove > /dev/null 2>&1
- rm -f /etc/init.d/ssh-host-keys
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement