Advertisement
Guest User

Untitled

a guest
Jun 30th, 2015
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. ### BEGIN INIT INFO
  4. # Provides: ssh-host-keys
  5. # Required-Start:
  6. # Required-Stop:
  7. # Default-Start: 2 3 4 5
  8. # Default-Stop:
  9. # Short-Description: Regenerates SSH host keys on first boot.
  10. ### END INIT INFO
  11. service ssh stop > /dev/null 2>&1
  12. rm -f /etc/ssh/ssh_host_*
  13. dpkg-reconfigure openssh-server
  14. update-rc.d ssh defaults > /dev/null 2>&1
  15. update-rc.d -f ssh-host-keys remove > /dev/null 2>&1
  16. rm -f /etc/init.d/ssh-host-keys
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement