Add a test script
This commit is contained in:
28
test.sh
Executable file
28
test.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
ssh_clean ()
|
||||
{
|
||||
ssh-keygen -R "[127.0.0.1]:4242" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
ssh_exec ()
|
||||
{
|
||||
login=${1-marvin}
|
||||
shift
|
||||
port=${1-4242}
|
||||
shift
|
||||
ssh -p ${port} -l ${login} -o StrictHostKeyChecking=no 127.0.0.1 $@
|
||||
}
|
||||
|
||||
main ()
|
||||
{
|
||||
login=${1-gbaconni}
|
||||
port=${2-4242}
|
||||
ssh_clean
|
||||
ssh_exec ${login} ${port} whoami
|
||||
}
|
||||
|
||||
main $@
|
||||
exit $?
|
||||
|
||||
#42
|
||||
Reference in New Issue
Block a user