Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;; -------------------------------------
- ;; TeraTerm ログインスクリプト
- ;; SSHで接続する。
- ;; ログを取る。
- ;; Version 4.64で動作確認
- ;; -------------------------------------
- ;; ログインユーザー名(アカウント)
- strUsername = 'hoge'
- strPassword = 'hoge'
- ;; 接続先(ホスト名またはIPアドレス)
- strHostname = 'XXX.XXX.XXX.XXX'
- ;; ログファイル
- logName = "C:\tmp\teraterm-log\TTM-%Y%m%d-%H%M%S."
- strconcat logName strHostname
- strconcat logName ".log"
- getdate strLogfile logName
- ;; 接続準備
- strConnect = strHostname
- strconcat strConnect ':22 /ssh /auth=password /user='
- strconcat strConnect strUsername
- strconcat strConnect ' /passwd='
- strconcat strConnect strPassword
- ;; 接続
- connect strConnect
- ;; ログを取る
- logopen strLogfile 1 0
- ;; 任意コマンド
- wait '# '
- sendln "alias ll='ls -las'"
Add Comment
Please, Sign In to add comment