Merge pull request #44 from caodg/master
add USER/.ssh/config to disable StrictHostKeyChecking
This commit is contained in:
commit
d30d22861d
|
@ -22,3 +22,9 @@ SSH_DIR=$USER_DIR/ssh
|
|||
# maybe it should be delete
|
||||
ssh-keygen -t rsa -P '' -f $SSH_DIR/id_rsa &>/dev/null
|
||||
cp $SSH_DIR/id_rsa.pub $SSH_DIR/authorized_keys
|
||||
|
||||
cat << EOF > $SSH_DIR/config
|
||||
Host *
|
||||
StrictHostKeyChecking no
|
||||
UserKnownHostsFile=/dev/null
|
||||
EOF
|
||||
|
|
|
@ -72,7 +72,9 @@ echo "[*] Masking dbus.service"
|
|||
chroot $BASEFS systemctl mask dbus.service
|
||||
|
||||
echo "[*] Disabling apache2 service(if installed)"
|
||||
if [ -d $BASEFS/etc/apache2 ] ; then
|
||||
chroot $BASEFS update-rc.d apache2 disable
|
||||
fi
|
||||
|
||||
echo "[*] Disabling ondemand service(if installed)"
|
||||
chroot $BASEFS update-rc.d ondemand disable
|
||||
|
@ -81,10 +83,14 @@ echo "[*] Disabling dbus service(if installed)"
|
|||
chroot $BASEFS update-rc.d dbus disable
|
||||
|
||||
echo "[*] Disabling mysql service(if installed)"
|
||||
if [ -d $BASEFS/etc/mysql ] ; then
|
||||
chroot $BASEFS update-rc.d mysql disable
|
||||
fi
|
||||
|
||||
echo "[*] Disabling nginx service(if installed)"
|
||||
if [ -d $BASEFS/etc/nginx ] ; then
|
||||
chroot $BASEFS update-rc.d nginx disable
|
||||
fi
|
||||
|
||||
echo "[*] Setting worker_processes of nginx to 1(if installed)"
|
||||
[ -f $BASEFS/etc/nginx/nginx.conf ] && sed -i -- 's/worker_processes\ auto/worker_processes\ 1/g' $BASEFS/etc/nginx/nginx.conf
|
||||
|
@ -104,3 +110,12 @@ cp npmrc $BASEFS/root/.npmrc
|
|||
|
||||
echo "[*] Copying DOCKLET_NOTES.txt to $BASEFS/root/DOCKLET_NOTES.txt"
|
||||
cp DOCKLET_NOTES.txt $BASEFS/root/
|
||||
|
||||
echo "[*] Updating USER/.ssh/config to disable StrictHostKeyChecking"
|
||||
for f in $FS_PREFIX/global/users/* ; do
|
||||
cat <<EOF > $f/ssh/config
|
||||
Host *
|
||||
StrictHostKeyChecking no
|
||||
UserKnownHostsFile=/dev/null
|
||||
EOF
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue