Change putty settings


You can change few default putty settings and extraputty behavior (env var) through configuration script ini.lua

This file shall be put in the same folder than putty.

Examples of using ini.lua:

lua_putty_settings("ExtraPuTTY_MODE","REG_FILE");
lua_putty_settings("ExtraPuTTY_BOXSIZE","AUTO");
lua_putty_settings("logtype" ,"LGTYP_DEBUG"); 

You can change few default putty settings during a session through a lua script instead of using Change settings menu

Examples of using during a session with a lua script:

-- Reconfigure Putty settings

lua_putty_settings("logtype" ,"LGTYP_DEBUG"); 
lua_putty_settings("rekey_time" ,"0");
lua_putty_settings("rekey_data" ,"2G");
lua_putty_settings("log_sessions_events" ,"1"); 
lua_putty_settings("ExtraPuttyTimeStampTerm" ,"TS_TERM");  
lua_putty_settings("ExtraPuttyTimeStampFormat" ,"[%S%T -- TEST]");
lua_putty_settings("logfilename" ,"c:\\putty.txt"); 
lua_putty_settings("logxfovr" ,"LGXF_APN"); 
lua_putty_settings("logflush" ,"0"); 
lua_putty_settings("logomitpass" ,"0"); 
lua_putty_settings("logomitdata" ,"1"); 
lua_putty_settings("set_host_key","42:16:b4:bc:22:7a:31:05:71:26:5b:2d:fa:8e:73:3a"); 

--Port forwarding source 2000, destination 192.168.23.3:4000, Local, ipV6
lua_putty_settings("SSH_PORT_FORWARDING_NEW","2000;192.168.23.3:4000;0;2");

-- Apply new settings

lua_do_reconfig();

Examples of using during a session with extraputty DLL (see MFC example):

-- Reconfigure Putty settings

	PuttySettings(ConnexionId,"logtype" ,"LGTYP_DEBUG" , "", "");
	PuttySettings(ConnexionId,"rekey_time" ,"0" , "", "");
	PuttySettings(ConnexionId,"rekey_data" ,"2G" , "", "");
	PuttySettings(ConnexionId,"log_sessions_events" ,"1" , "", "");
	PuttySettings(ConnexionId,"ExtraPuttyTimeStampTerm" ,"TS_TERM" , "", "");
	PuttySettings(ConnexionId,"ExtraPuttyTimeStampFormat" ,"[%S%T -- TEST]" , "", "");
	PuttySettings(ConnexionId,"logfilename" ,"c:\\putty.txt" , "", "");	
	PuttySettings(ConnexionId,"logxfovr" ,"LGXF_APN" , "", "");
	PuttySettings(ConnexionId,"logflush" ,"0" , "", "");	
	PuttySettings(ConnexionId,"logomitpass" ,"0" , "", "");
	PuttySettings(ConnexionId,"logomitdata" ,"1" , "", "");

	

-- Apply new settings

DoReconfig(ConnexionId, "", "");

Available settings:


Due to the large number of parameters, the list is still ongoing .... Do not hesitate to contact us if you need a non listed settings


ExtraPuTTY behavior :

Settings Value
ExtraPuTTY_USERPROFILE PATH : putty configuration path to save sessions, host keys, parameters
ExtraPuTTY_MODE DIR_MODE : for File storage (default mode)
REG_MODE : for Window registry database storage
ExtraPuTTY_BOXSIZE NORMAL : Display 7 saved sessions
AUTO : Display all saved sessions (min 7, max 35)
DISPLAY_xy : Display xy sessions (with x = 1,2,3 , and y = 0,5)

Putty settings 'Session' part:

Settings Value
DEFAULT_PROTOCOL ROT_TELNET
PROT_CYGTERM
PROT_RAW
PROT_SERIAL
PROT_RLOGIN

Putty settings 'Session->logging' part:

Settings Value
logtype LGTYP_NONE : None
LGTYP_DEBUG : All session output
LGTYP_ASCII : Printable ouput
LGTYP_PACKETS : SSH Packets
SSH + RAW packets
log_sessions_events tick 1 not 0
ExtraPuttyTimeStampTerm TS_NONE : None
TS_TERM : TimeStamp on terminal
TS_FILE : TimeStamp on log
logfilename path+filename
logxfovr EXT_SYS_CMD_ABOUT_EXT
logflush tick 1 not 0
logomitpass tick 1 not 0
logomitdata tick 1 not 0

Putty settings 'Connection->SSH->Kex' part:

Settings Value
rekey_time 0 , 1 ....
rekey_data 1M, 1G, 2G ....
set_host_key host key

Putty settings 'Connection->SSH->Tunnels' part:

Settings Value
SSH_PORT_FORWARDING_LOCAL_PORT tick 1 not 0
SSH_PORT_FORWARDING_REMOTE_PORT tick 1 not 0
SSH_PORT_FORWARDING_NEW source;desdination;dir_type;ip_type

source => source port
desdination => host.name:port
dir_type => 0: Local, 1: Remote, 2: Dynamic
ip_type => 0: Auto, 1: IPv4, 2: IPv6

< Back