[开源]Tera Term - 远程连接工具 - SecureCRT替代者

https://ttssh2.osdn.jp/index.html.en
主体是BSD的License,部分组件是其他协议,还有不开源的组件。
但主要免费。

写在前面

开源软件你就需要习惯他奇怪的设计

  • 配置不会自动保存,你必须手动保存替换他目录下的ini。
  • ssh断连进程会自动关闭,建议设置自动记录日志。
  • 自行查文档,自行熟悉那一堆组件是干嘛用的
  • teramenu的配置是保存在注册表里HKEY_CURRENT_USER\Software\ShinpeiTools\TTermMenu

自动登录

telnet

另一方面就在于它可以通过TTL脚本实现自动反应以及记住密码自动登录(telnet),密码有加密。

TTL脚本例子

getpassword 'password.dat' 'adminpassword' password
connect '172.30.0.1:23 /nossh /T=1'
wait 'ame:'
sendln 'admin'
wait 'Password:'
sendln password
wait '#'
sendln 'ter mo'
wait '#'
sendln 'con t'

其中第一次要手动输入密码,然后密码保存在password.dat中。

SSH

SSH就比较奇葩了,中文翻译是记住密码,但实际英文是remember in memory.
菜单栏的SSH里就翻译成了保存在内存中的密码,不知道什么意思,也不起作用。
但是Tera Term Menu 可以实现自动登陆
Tera Term Menu的ssh自动登录是自动使用命令行来实现的,甭管怎么加密密码,任务管理器里查看命令行能看到明文的密码。
(TTL脚本不知道怎么把password.dat转换并塞到字符串里去,以后慢慢研究吧)

自动记录日志

相关文档
https://ttssh2.osdn.jp/manual/en/menu/setup-additional.html

Specify default log file name. It can include a format of strftime.

&h      Host name(or empty when not connecting)
&p      TCP port number(or empty when not connecting, not TCP connection)
&u      Logon user name
%a      Abbreviated weekday name
%A      Full weekday name
%b      Abbreviated month name
%B      Full month name
%c      Date and time representation appropriate for locale
%d      Day of month as decimal number (01 - 31)
%H      Hour in 24-hour format (00 - 23)
%I      Hour in 12-hour format (01 - 12)
%j      Day of year as decimal number (001 - 366)
%m      Month as decimal number (01 - 12)
%M      Minute as decimal number (00 -  59)
%p      Current locale's A.M./P.M. indicator for 12-hour clock
%S      Second as decimal number (00 - 59)
%U      Week of year as decimal number, with Sunday as first day of week (00 - 53)
%w      Weekday as decimal number (0 - 6; Sunday is 0)
%W      Week of year as decimal number, with Monday as first day of week (00 - 53)
%x      Date representation for current locale
%X      Time representation for current locale
%y      Year without century, as decimal number (00 - 99)
%Y      Year with century, as decimal number
%z, %Z  Either the time-zone name or time zone abbreviation, depending on registry settings;
    no characters if time zone is unknown
%%      Percent sign

example

teraterm-%Y%m%d_%H_%M_%S-&h.log

增加SSH自动登陆相关
加深对配置的理解,增加自动记录日志相关