Add do to run commands inside the VM

This commit is contained in:
gbaconni
2021-11-08 12:13:23 +01:00
parent 503d406c47
commit 073629ab8c

23
do.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
ssh_clean ()
{
ssh-keygen -R "[127.0.0.1]:4242" >/dev/null 2>&1
}
ssh_exec ()
{
ssh -p 4242 -l ${USER} -o StrictHostKeyChecking=no 127.0.0.1 $@ 2>&1 \
| grep -v -e 'Warning: Permanently added'
}
main ()
{
ssh_clean
ssh_exec $@
}
main $@
exit $?
#42