; Tera Term + RDP ; ログオン先SSHサーバ名とポート番号 wheresshhost = 'test.servers.net' wheresshport = '22' ; SSHプロトコルバージョン wheresshver = '2' ; ログオン先RDPサーバ(ローカル転送ポート, 接続先RDPサーバ名,RDPポート番号) whererdpfwd = '5910' whererdphost = '172.16.0.0' whererdpport = '3389' ; SSHユーザ名とパスワード ; 片方のみ指定は不可。 ; 両方の省略は可。省略すると入力ダイアログを表示。 wheresshusr = '' wheresshpwd = '' ; RDPコマンドライン ;strmstsc = "mstsc /v:localhost:5910 /w:1024 /h:768" ;strmstsc = "mstsc /v:localhost:5910 /f" strmstsc = "mstsc /v:localhost:5910 /w:1024 /h:768 /edit" ; 引数は http://okkun-lab.rd.fukuoka-u.ac.jp/wiki/?Tips%2FWindows%2FRDP 参照 ; 設定項目はここまで ; 処理開始 strconnect = '' ; ホスト名・ポート番号連結 STRCONCAT strconnect wheresshhost STRCONCAT strconnect ':' STRCONCAT strconnect wheresshport ; 認証方法連結 STRCONCAT strconnect ' /ssh ' ; SSH バージョン連結 strcompare wheresshver '1' IF result = 0 THEN STRCONCAT strconnect "/1 " ELSE STRCONCAT strconnect "/2 " ENDIF ; ユーザ名連結 STRCOMPARE wheresshusr "" IF result = 0THEN ELSE STRCONCAT strconnect '/auth=password ' STRCONCAT strconnect "/user=" STRCONCAT strconnect wheresshusr STRCONCAT strconnect " " ENDIF strcompare wheresshpwd "" IF result = 0THEN ELSE STRCONCAT strconnect "/user=" STRCONCAT strconnect wheresshpwd STRCONCAT strconnect " " ENDIF ; portfowarding STRCONCAT strconnect "/ssh-L" STRCONCAT strconnect whererdpfwd STRCONCAT strconnect ":" STRCONCAT strconnect whererdphost STRCONCAT strconnect ":" STRCONCAT strconnect whererdpport STRCONCAT strconnect " " ; 接続実行 CONNECT strconnect timeout = 30 WAIT "$" IF result = 0 THEN MESSAGEBOX "connection fault." ENDIF ; RDP起動 EXEC strmstsc