Variable $HOST$ substition in scripts

Variable $HOST$ substition in scripts

avatar

Hello, i've got several scripts using the variable $HOST$, for example launching Winscp or filezille :
Run : "C:\Program Files (x86)\WinSCP\WinSCP.exe"
Arguments : sftp://$USERNAME$:$PASSWORD$@$HOST$

It was ok for years, but not int the last release 2025.3.17.0.

Sometimes, it works once, and after not at all.
In Winscp or Filezilla, host is blank.
Could you take a look?

Thanks.

All Comments (7)

avatar

I've got the same thing with duplicate session...Closing and reloading the application works.

avatar

Hello,

Thank you for reaching out. I'm not entirely sure what you’re trying to achieve with your current configuration. Could you please provide a bit more information about your setup and the specific behavior you’re seeing?

It would also be very helpful if you could include a screenshot of:

  • The script or external tool configuration where you’re using the $HOST$ variable
  • The exact error or result you’re seeing when running it


Once we have that information, we’ll be able to investigate further and provide the appropriate solution.

Best regards,

Carl Marien

avatar

Hello, i've got several entries in Scripts.
I've created launch_winscp

Properties :
General : Run -> "C:\Program Files (x86)\WinSCP\WinSCP.exe"
Arguments -> sftp://$USERNAME$:$PASSWORD$@$HOST$
Advanced : Open embedded, Shell execute

When i right click on an entry, SSH to a linux server, i've got Macro/Scripts/Tools and i can click on "launch_winscp"
Winscp launch and the Host, the username and the password are filled from the host configuration.

But i've wanted to do a new script, it seems that the properties have changed (my script is 5 years old)

But when the problem occurs, Winscp warns that there is a missing host and i can not duplicate a ssh session, i've got a warning that the host is missing.


remotedesktop_host.pdf

avatar

Hello,

Thank you for your patience.

I’ve found a workaround to replicate the behavior. Instead of creating a script, could you right-click on the entry, then select *Open With Parameters*, and choose SCP?

Would this workaround be acceptable for you?

Best regards,

Carl Marien

avatar

Hello, no, i'am afraid. Winscp is more powerfull and stable, the internal SCP is too light to be used. And it's not only for that, i'm using several commands and i need the hostname to be passed.

avatar

Hello,

I would like to schedule a remote session with you. I will be sending an email shortly with a link to request the session. During the session, I will attempt to reproduce the issue.

Best regards,

Carl Marien

avatar

Hello,

During a support session, we identified an issue where RDM variables are not passed correctly to a macro/script when the used entry credentials are linked to another entry.

  • When the user first opens an SSH session, then runs the same script, some variables are missing.
  • In the user’s case, $HOST$ is not passed.
  • On my side, I reproduced a similar issue with $PASSWORD$ not being passed to an external SCP tool (WinSCP).


Tests performed:

  • New script entry → same issue
  • With/without quotes → no change
  • Reset local RDM profile → no change
  • Tested multiple RDM versions → issue persists
  • Linked vs inline credentials → same behavior

A bug report has been created for investigation.

Thank you,

Carl Marien