Re: Putty command line options
You can make a script/batch file that takes a host name as an argument and produces specific switch on its output. Then use
Example:
Where
See
https://winscp.net/eng/docs/ui_pref_integration_app
!`command`
pattern in PuTTY path to make use of that script. Use !@
pattern to pass a host name to the script. Use of !@
unfortunately comes at cost that WinSCP does not create temp site in PuTTY anymore. So you will need to explicitly pass a username using !U
pattern and you cannot pass other specific parameters.
Example:
%PROGRAMFILES%\PuTTY\putty.exe !`C:\path\portforward.bat !@` !U@!@
Where
portforward.bat
is like:
@echo off
if "%1" == "example.com" echo -L80:localhost:80 -L5432:localhost:5432
See
https://winscp.net/eng/docs/ui_pref_integration_app