24 lines
272 B
Bash
Executable File
24 lines
272 B
Bash
Executable File
#!/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
|