I'm quite new with MobaXterm. For each SSH session that I open to a given host, I want to log the terminal output to an individual file whose filename includes the given hostname + timestamp. I have thus setup my MobaXterm terminal settings with "&H_&Y-&M-&D-&T" as log filename, where "$H" is a variable standing for "hostname".
It works as a charm when opening a new session by clicking on "Session" icon from MobaXterm's GUI then select "SSH" and manually provide the hostname's FQDN I want to connect to.
Example:
Session -> SSH -> Remote host: "MyNas.MydomainName" ==> Log file name is properly set to "MyNas.MydomainName_2022-01-07-113521.log"
However, if I open a similar session from windows's command line prompt, the log filename's hostname part is set to "localhost", instead of my hostname.
Example:
C:\Program Misc\MobaXterm>MobaXterm_Personal_21.5.exe -newtab "ssh MyNas.MydomainName" ==> Log file name is wrongly set to "localhost_2022-01-07-113521.log"
Any insight ? Many thanks in advance for helping.