Add do to run commands inside the VM
This commit is contained in:
23
do.sh
Executable file
23
do.sh
Executable 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
|
||||
Reference in New Issue
Block a user