Skip to content

Instantly share code, notes, and snippets.

@Kiyoshi-T
Last active December 21, 2016 02:36
Show Gist options
  • Save Kiyoshi-T/e921670151180d68dc0a3f7edb111842 to your computer and use it in GitHub Desktop.
Save Kiyoshi-T/e921670151180d68dc0a3f7edb111842 to your computer and use it in GitHub Desktop.
teraterm マクロで複数のSSH転送設定を組み込む ref: http://qiita.com/Kiyoshi-T/items/1031bd1bdb91df0915f8
;;踏み台サーバへの接続情報(鍵認証の場合)
username = 'hogeuser'
hostname = '192.168.1.10'
keyfile = 'C:\Users\hogeuser\Documents\humidai.key'
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;SSH転送設定(4台のwebサーバ)
svr1 = '9999:10.1.1.10:https'
svr2 = '9998:10.1.1.11:https'
svr3 = '9997:10.1.1.12:https'
svr4 = '9996:10.1.1.13:https'
sprintf2 svr '%s,%s,%s,%s' svr1 svr2 svr3 svr4
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;踏み台サーバへの接続
msg = hostname
strconcat msg ':22 /ssh2 /auth=publickey /user='
strconcat msg username
strconcat msg ' /keyfile='
strconcat msg keyfile
;;SSH転送組み込み
strconcat msg ' /ssh-L'
strconcat msg svr
connect msg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment