This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: regenerate_ssh_host_keys | |
# Required-Start: | |
# Required-Stop: | |
# Default-Start: 2 | |
# Default-Stop: | |
# Short-Description: Regenerate ssh host keys | |
# Description: | |
### END INIT INFO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#copy your ssh key to root@raspberrypi | |
ssh [email protected] 'aptitude install screen' | |
ssh [email protected] 'screen -d -m -S clone' | |
ssh [email protected] 'echo u > /proc/sysrq-trigger' | |
ssh [email protected] 'screen -x clone' | |
dd if=/dev/mmcblk0 bs=1M of=/dev/sda count=4K | |
#for the first 4GB | |
#detach with "CRTL-a d" |
NewerOlder