ISSUE:
Sometimes a file or a command need be used against to a list of servers or databases. So a general file or command need be generated with specific information as a general pattern such as database name.
SOLUTION:
A simple While statement can do this task. So general while statement is provided for easy access
Statement:
while read line
do
host_name=`echo $line | cut -d ' ' -f 1` #get first field of input line
host_ip=`echo $line | cut -d ' ' -f 2` # get second field of input line
short_hname=${host_name%%\.*} # remove domain port of hostname
alias_hname=${short_hname:9:5} # extract 5 character starting at 9 as alias name
if [ ${short_hname:0:3} == "tet" ] ; then # extract 3 character to setup environment name
env_name=test
else
env_name=${short_hname:4:3}
fi
echo "sshpass -e ssh -o StrictHostKeyChecking=no test@$host_ip" > ${env_name}_${alias_hname}_${short_hname}.sh # generate a sh file for ssh login for each server
chmod 700 ${env_name}_${alias_hname}_${short_hname}.sh # make gererated file executable
done < serverlist.txt
Thursday, June 26, 2014
Wednesday, June 18, 2014
Xlib: Client is not authorized to connect to Server Exceed
ISSUE:
Remote display is refused by local exceed server.
Cause:
host acceptence ACL is not configured for the remote server.
Solution:
configure exceed to accept anyhost or the remote servers you want
1. click Start -> all program -> Hummingbird Connectivity 2008 x64 -> exceed tools -> Xconfig
2. click icon "Security, Access Control and System Administration" category.
3. select file if you need input a list of servers or any host access for all hosts
4. save and exit
Remote display is refused by local exceed server.
Cause:
host acceptence ACL is not configured for the remote server.
Solution:
configure exceed to accept anyhost or the remote servers you want
1. click Start -> all program -> Hummingbird Connectivity 2008 x64 -> exceed tools -> Xconfig
2. click icon "Security, Access Control and System Administration" category.
3. select file if you need input a list of servers or any host access for all hosts
4. save and exit
Subscribe to:
Posts (Atom)