mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
Added install_key to iop
This commit is contained in:
parent
d3bf187a66
commit
b5b88e6335
1 changed files with 18 additions and 0 deletions
18
iop/scripts/install_key.sh
Executable file
18
iop/scripts/install_key.sh
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
# this is a developer helper script to install the public ssh key in the created image
|
||||
|
||||
function install_key {
|
||||
|
||||
mkdir -p files/etc/dropbear
|
||||
test -e ~/.ssh/id_dsa.pub && cat ~/.ssh/id_dsa.pub >>files/etc/dropbear/authorized_keys
|
||||
test -e ~/.ssh/id_rsa.pub && cat ~/.ssh/id_rsa.pub >>files/etc/dropbear/authorized_keys
|
||||
chmod 0644 files/etc/dropbear/authorized_keys
|
||||
|
||||
echo "::sysinit:/etc/init.d/rcS S boot" >files/etc/inittab
|
||||
echo "::shutdown:/etc/init.d/rcS K shutdown" >>files/etc/inittab
|
||||
echo "tty/0::askfirst:/bin/ash --login" >>files/etc/inittab
|
||||
echo "ttyS0::askfirst:/bin/ash --login" >>files/etc/inittab
|
||||
|
||||
echo Done
|
||||
}
|
||||
|
||||
register_command "install_key" "Install the user's public ssh key in the created image"
|
||||
Loading…
Add table
Reference in a new issue