Guest User

Untitled

a guest
Nov 20th, 2018
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. ;; -------------------------------------
  2. ;; TeraTerm ログインスクリプト
  3. ;; SSHで接続する。
  4. ;; ログを取る。
  5. ;; Version 4.64で動作確認
  6. ;; -------------------------------------
  7.  
  8. ;; ログインユーザー名(アカウント)
  9. strUsername = 'hoge'
  10. strPassword = 'hoge'
  11.  
  12. ;; 接続先(ホスト名またはIPアドレス)
  13. strHostname = 'XXX.XXX.XXX.XXX'
  14.  
  15. ;; ログファイル
  16. logName = "C:\tmp\teraterm-log\TTM-%Y%m%d-%H%M%S."
  17. strconcat logName strHostname
  18. strconcat logName ".log"
  19. getdate strLogfile logName
  20.  
  21. ;; 接続準備
  22. strConnect = strHostname
  23. strconcat strConnect ':22 /ssh /auth=password /user='
  24. strconcat strConnect strUsername
  25. strconcat strConnect ' /passwd='
  26. strconcat strConnect strPassword
  27.  
  28. ;; 接続
  29. connect strConnect
  30.  
  31. ;; ログを取る
  32. logopen strLogfile 1 0
  33.  
  34. ;; 任意コマンド
  35. wait '# '
  36. sendln "alias ll='ls -las'"
Add Comment
Please, Sign In to add comment