diff --git a/root/usr/bin/client-shell b/root/usr/bin/client-shell new file mode 100644 index 0000000..b493d8b --- /dev/null +++ b/root/usr/bin/client-shell @@ -0,0 +1,16 @@ +#!/bin/sh + +if [ "$1" = "" ] ; then + echo "Usage:" + echo "$0 [hostname]" + exit 1 +fi + +USER=$(db hosts getprop "$1" sshUser) + +if [ "$USER" = "" ] ; then + echo "Can't find an user for $1" + exit 1 +fi + +/usr/bin/sudo -u amgmt /usr/bin/ssh -o StrictHostKeyChecking=no ${USER}\@${1} ${@:2}