TTL macro登陆linux服务器
Posted yanweichen
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了TTL macro登陆linux服务器相关的知识,希望对你有一定的参考价值。
;log文件路径 logFilePath="C:\Users\18430\Desktop\java\logfiles" ;登陆user USERNAME = ‘root‘ ;登陆密码 PASSWORD = ‘123456‘ ;连接登陆命令 COMMAND = ‘192.168.188.128‘ strconcat COMMAND ‘:22 /ssh /2 /auth=password /user=‘ strconcat COMMAND USERNAME strconcat COMMAND ‘ /passwd=‘ strconcat COMMAND PASSWORD ;连接
connect COMMAND wait ‘‘ ; ; PowerCycle with logging ; gettime timestr "%Y%m%d-%H%M%S" sprintf2 filename ‘%s\console_%s_%s.log‘ logFilePath USERNAME timestr logopen filename 0 0 step = 0 ;while 1 ; call show_step strconcat msg COMMAND strconcat msg ‘ login successfully ‘#13#10 logwrite msg sendln ‘cd /home‘ sendln ‘touch jjj.txt‘ wait ‘ ‘ ;pause 2 ;endwhile logclose end :show_step step = step + 1 gettime timestr sprintf2 str ‘[%d] %s‘ step timestr statusbox str ‘counter‘ return
以上是关于TTL macro登陆linux服务器的主要内容,如果未能解决你的问题,请参考以下文章