improve ssh speed during testing

This commit is contained in:
Edwin Eefting 2023-10-03 12:49:32 +02:00
parent 8b8be80ab7
commit ff86e3c67f
No known key found for this signature in database
GPG Key ID: 0F3C35D8E9887737
2 changed files with 27 additions and 3 deletions

View File

@ -18,6 +18,15 @@ if ! [ -e /root/.ssh/id_rsa ]; then
ssh -oStrictHostKeyChecking=no localhost true || exit 1
fi
cat >> ~/.ssh/config <<EOF
Host *
addkeystoagent yes
controlpath ~/.ssh/control-master-%r@%h:%p
controlmaster auto
controlpersist 3600
EOF
modprobe brd rd_size=512000
umount /tmp/ZfsCheck*

View File

@ -4,8 +4,13 @@
set -e
if ! [ -e /.dockerenv ]; then
echo "only run this script inside a docker container!"
exit 1
fi
if ! [ -e /dev/ram0 ]; then
echo "Please run this outside container:" >&2
echo "Please load this module outside container:" >&2
echo "sudo modprobe brd rd_size=512000" >&2
exit 1
@ -16,11 +21,21 @@ ssh-keygen -A
/usr/sbin/sshd
udevd -d
#test ssh localhost
#config ssh
if ! [ -e /root/.ssh/id_rsa ]; then
ssh-keygen -t rsa -f /root/.ssh/id_rsa -P ''
fi
cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys
cat >> ~/.ssh/config <<EOF
Host *
addkeystoagent yes
controlpath ~/.ssh/control-master-%r@%h:%p
controlmaster auto
controlpersist 3600
EOF
cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys
ssh -oStrictHostKeyChecking=no localhost 'echo SSH OK'
cd /app