Monday, January 12, 2009

remsh or ssh?

You might have a centralized server that has remsh/ssh authentication setup with all the other servers in your environment. You want to write a script to, lets say, get a crontab listing of all the servers. The command below shows if you can either remsh or ssh.

=========================================
ssh -o BatchMode=yes $i /bin/truex
if [[ $? -eq 0 ]];then
echo "ssh enabled"
else
echo "remsh enabled"
fi


=========================================

-- Vish

No comments: