0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Tera Termログインマクロ

Last updated at Posted at 2019-07-31

TTLファイル(.ttl)

以下の内容を、設定を書き換えてTTLファイルとして保存する。

; 設定(ここのみ書き換えて使いまわす)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
username = 'kurita-shougo'
hostname = 'test.host.jp'
keyfile = 'C:\Users\kurita-shougo\.ssh\id_rsa'
passwdfile = 'C:\Users\kurita-shougo\tool\teraterm\password.dat'
configfile = 'C:\Users\kurita-shougo\tool\teraterm\TERATERM.INI'
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

msg = 'Enter password for user '
strconcat msg username
passwdkey = username
strconcat passwdkey '@'
strconcat passwdkey hostname
getpassword passwdfile passwdkey password

msg = hostname
strconcat msg ':22 /ssh /auth=publickey'
strconcat msg ' /user='
strconcat msg username
strconcat msg ' /keyfile='
strconcat msg keyfile
strconcat msg ' /passwd="'
strconcat msg password
strconcat msg '"'
strconcat msg ' /F='
strconcat msg configfile
connect msg

TTLファイルを「Tera Term Macro Interpreter」で実行するだけでログインができる。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?