2

I'm trying to open plink from a *.bat on Windows 10, with the colour scheme defined from an existing session in PuTTY, and while the commands are correctly executing, and the right results displayed, the colour scheme is missing:

Start /D "C:\PuTTY" plink.exe -load %PUTTY_SESSIONNAME% -m %COMMAND_FILE%

Using putty instead of plink gets the right colour scheme, with commands correctly executed, but the results are not displayed right, as all returned text is on a unique line:

Start /D "C:\PuTTY" putty.exe -load %PUTTY_SESSIONNAME% -m %COMMAND_FILE%

How can I solve this issue with plink/putty?

1 Answers1

2

Providing a command using the -m switch disables a pseudo terminal allocation. That make some commands behave differently than in a regular interactive SSH shell session.

Add the -t switch to re-enable the pseudo terminal.

start /D "C:\PuTTY" putty.exe -t -load %PUTTY_SESSIONNAME% -m %COMMAND_FILE%