LogDir="/var/temp/vpnuser" CurrentDate=`date` FinalDate=`date -j -f "%a %b %d %T %Z %Y" "${CurrentDate}" +"%Y-%m-%d %T"` FileDate=`date -j -f "%a %b %d %T %Z %Y" "${CurrentDate}" +"%Y-%m-%d"` vpn=`ssh nsroot@localhost 'sh vpn vserver' | sed -n '/Current AAA Users/p' | nawk '{print $4}'` #sh vpn vserver 명령에 대한 결과 중 "Current AAA Users"라인만 프린트한 후 awk 명령어로 특정 field에 대한 string 값을 출력한다. if [ ! -e "${LogDir}/${FileDate}.txt" ]; then echo "TIME|Current VPN Users" >> ${LogDir}/${FileDate}.txt fi `echo "${FinalDate}|${vpn}" >> ${LogDir}/${FileDate}.txt` |
cd ~ mkdir .ssh 2> /dev/null cd /root/.ssh ssh-keygen -b 1024 -f identity -P '' -t dsa # For each "target" Netscaler you wish to be able to login without passwords do: scp identity.pub nsroot@<ip of target>:/root/.ssh/identity.pub # enter password when prompted for the remote box On each of the target machines, then do the following: cd ~/.ssh cat identity.pub >> authorized_keys #위 과정을 모드 마치면 넷스케일러에 SSH로 비밀번호 인증없이 접속이 가능함. |



