概要
TeraTermを起動するたびに、ホスト選んで、ユーザ名とパスワードを入力がめんどくさい。
ファイルに書いてそれを実行するだけで、すぐ使えるようにしたい。
ログイン用ttlファイルを作成
teratermのインストールフォルダにsshlogin.ttlというのが入っています。
sshlogin.ttl
; sample macro of Tera Term
;
; File: ssh2login.ttl
; Description: auto login with SSH2 protocol
; Environment: generic
; Update: 2004/12/4
; Author: Yutaka Hirata
username = 'nike'
hostname = '192.168.1.3'
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
msg = 'Enter password for user '
strconcat msg username
passwordbox msg 'Get password'
msg = hostname
strconcat msg ':22 /ssh /auth=password /user='
strconcat msg username
strconcat msg ' /passwd='
strconcat msg inputstr
connect msg
これを参考に以下のように修正。
login.ttl
username = 'nike'
password = 'nike'
hostname = '192.168.1.3'
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
msg = hostname
strconcat msg ':22 /ssh /auth=password /user='
strconcat msg username
strconcat msg ' /passwd='
strconcat msg password
connect msg
実行
TeraTermのインストールフォルダにある「ttpmacro.exe」に関連付けて実行