LoginSignup
5
6

More than 5 years have passed since last update.

WinSCPで踏み台サーバ経由でファイルGet

Last updated at Posted at 2016-04-26

WinSCPで踏み台サーバ経由でファイルGet

コマンドラインから、WinSCPを踏み台サーバ経由で使用します

①ScpTest.txtを用意する

ScpTest.txt
192.168.1.1がファイルを取得したいサーバ
172.16.1.1が踏み台サーバとします
option sftp〜TunnelPasswordPlainまでは改行しないでください

option batch abort
option confirm off

open sftp://user:passwd@192.168.1.1 -rawsettings ProxyMethod=1 Tunnel=1 TunnelHostName=172.16.1.1 TunnelPortNumber=22 TunnelUserName=user TunnelPasswordPlain=passwd

lcd "C:\aaa\Desktop\getfiles"

get /tmp/20160101/*

close 
exit

②実行方法

"C:/Program Files/WinSCP/WinSCP.exe" /console /script=C:/aaa/ScpTest.txt /xmllog="C:/aaa/Scplog.log"
5
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
6