最新のtera termのダウンロードは以下の公式サイトをどうぞ
https://ja.osdn.net/projects/ttssh2/
aws(Amazon Web Service)
以下コピペ用
HOSTADDR = 'xxx.xxx.xxx.xxx'
USERNAME = 'ec2-user'
KEY_FILE = 'C:\Users\xxxxxx\.ssh\xxxx.pem'
COMMAND = HOSTADDR
strconcat COMMAND ':22 /ssh /2 /auth=publickey /user='
strconcat COMMAND USERNAME
strconcat COMMAND ' /keyfile='
strconcat COMMAND KEY_FILE
connect COMMAND
end
USERNAME = 'ec2-user'
KEY_FILE = 'C:\Users\xxxxxx\.ssh\xxxx.pem'
COMMAND = HOSTADDR
strconcat COMMAND ':22 /ssh /2 /auth=publickey /user='
strconcat COMMAND USERNAME
strconcat COMMAND ' /keyfile='
strconcat COMMAND KEY_FILE
connect COMMAND
end
- HOSTADDRとKEY_FILEの値を自分の環境に修正
- 拡張子を.ttlで保存する
- ttpmacro.exe※と関連付ける
※C:\Program Files (x86)\teraterm内にあるので「参照」で探す
さくらのVPS
以下コピペ用
ADDR = 'xxx.xxx.xxx.xxx'
USER = 'xxx'
; マクロ実行時に作成するパスワードファイルの保存場所
PASS = 'C:\Users\xxx\Desktop\マクロ\pass.dat'
; 秘密鍵の保存場所
KEY = 'C:\Users\xxxxxx\Desktop\マクロ\id_rsa'
PORTNO = '15876'
ROOTPASS = 'xxxxxxxxxxxxxxxxxxx'getpassword PASS USER PASSWORD
COMMAND = ADDR
strconcat COMMAND ':'
strconcat COMMAND PORTNO
strconcat COMMAND ' /ssh /2 /auth=publickey /user='
strconcat COMMAND USER
strconcat COMMAND ' /passwd='
strconcat COMMAND PASSWORD
strconcat COMMAND ' /keyfile='
strconcat COMMAND KEY
connect COMMAND
wait USER
sendln 'su -'
wait 'Password'
sendln ROOTPASS'
end
USER = 'xxx'
; マクロ実行時に作成するパスワードファイルの保存場所
PASS = 'C:\Users\xxx\Desktop\マクロ\pass.dat'
; 秘密鍵の保存場所
KEY = 'C:\Users\xxxxxx\Desktop\マクロ\id_rsa'
PORTNO = '15876'
ROOTPASS = 'xxxxxxxxxxxxxxxxxxx'getpassword PASS USER PASSWORD
COMMAND = ADDR
strconcat COMMAND ':'
strconcat COMMAND PORTNO
strconcat COMMAND ' /ssh /2 /auth=publickey /user='
strconcat COMMAND USER
strconcat COMMAND ' /passwd='
strconcat COMMAND PASSWORD
strconcat COMMAND ' /keyfile='
strconcat COMMAND KEY
connect COMMAND
wait USER
sendln 'su -'
wait 'Password'
sendln ROOTPASS'
end