目录
2.通过TTL设定,①指定TeraTerm窗口名称、②让Log中显示时间信息、③指定log名字
①课题解决:Accept window title change request 设置为 last
■目录结构
■bat
set password=yourPassword
set windowTitle='MyLinux'
"C:\Program Files (x86)\teraterm-4.98\ttpmacro.exe" "%~dp0ttl\autoLogin.ttl" %password%
■ttl
自动登陆后,执行一条ls -l 命令
password = param2
command = '192.168.131.128:22 /ssh /2 /auth=password /user=sxz001 /passwd='
strconcat command password
connect command
if result <> 2 then
messagebox 'Can not connected'
end
endif
timeout = 10
wait '>' '$' '#'
if result = 0 then
end
endif
command = "ls -l"
sendln command
wait '$'
sendln 'id'
■效果
■注意点
●平时执行 TeraTerm时,使用的执行文件
"C:\Program Files (x86)\teraterm-4.98\ttermpro.exe"
●执行ttl时,使用的执行文件
"C:\Program Files (x86)\teraterm-4.98\ttpmacro.exe"