diff options
author | Maarten Vanraes <alien@mageia.org> | 2011-10-24 18:05:36 +0000 |
---|---|---|
committer | Maarten Vanraes <alien@mageia.org> | 2011-10-24 18:05:36 +0000 |
commit | 3d49f9dfdfcc1c5450320fde1b0702abfd5e9231 (patch) | |
tree | 0143632fd8b255c90fdb39a4b527f5dfeb81c820 /rescue/startssh | |
parent | bc48f7bd3456ca0a6f0003cfaabaf65669998a60 (diff) | |
download | drakx-3d49f9dfdfcc1c5450320fde1b0702abfd5e9231.tar drakx-3d49f9dfdfcc1c5450320fde1b0702abfd5e9231.tar.gz drakx-3d49f9dfdfcc1c5450320fde1b0702abfd5e9231.tar.bz2 drakx-3d49f9dfdfcc1c5450320fde1b0702abfd5e9231.tar.xz drakx-3d49f9dfdfcc1c5450320fde1b0702abfd5e9231.zip |
- add screen
- add dropbear
- add etc/shells
- add script that set password and start ssh server
Diffstat (limited to 'rescue/startssh')
-rwxr-xr-x | rescue/startssh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/rescue/startssh b/rescue/startssh new file mode 100755 index 000000000..4c48d8291 --- /dev/null +++ b/rescue/startssh @@ -0,0 +1,18 @@ +#!/bin/bash + +passwd=`genpasswd` + +if (( $? != 0 )); then + reset + exit $? +fi + +sed -E -i -e 's/^root:[^:]*:/root:'"$passwd"':/' /etc/passwd + +mkdir -p /etc/dropbear +[[ -f /etc/dropbear/dropbear_dss_host_key ]] || dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key +[[ -f /etc/dropbear/dropbear_rsa_host_key ]] || dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key + +echo "" +echo -n "Starting ssh daemon... " +dropbear && echo "OK" |