17 lines
296 B
Plaintext
17 lines
296 B
Plaintext
|
#!/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}
|