My company uses a bastion SSH server to connect to many of our ssh clients. I'm trying to create a script that could run once logged into bastion that will ssh to a client, run a couple commands, exit and then ssh to the next client and repeat.
This seams too much for post login commands, and I've tried to create a script/macro and excecute it, but it fails on the passwords for each ssh client. I've entered them in plain text in the macro, but when run it does not appear to accept the entry on bastion.
Any suggestions on running several ssh connections consecutively and automatically from within one bastion connection?
Hello,
Thank you for contacting us on this matter!
For your use case, I recommend configuring your SSH entries to open with a playlist. Once the playlist runs and all sessions open, go to the Actions tab and enable "Broadcast all". This ensures that everything you type in the first session is automatically sent to all the others.
Next, you can run your script using the "Execute command from palette" feature. To add one, click the "+" icon to add your script, then search for and execute it. The command will then run across all your sessions simultaneously.
Here's the exact steps for the configuration:
https://docs.devolutions.net/rdm/commands/edit/play-list/play-list-actions/
https://docs.devolutions.net/rdm/kb/how-to-articles/broadcast-actions-in-ssh-sessions/

Please let me know if this approach fits your needs. If you have any other questions, please let us know.
Best regards,
Maxim Robert
2025-09-23_11-18-57.png
Hello,
Thank you for contacting us on this matter!
For your use case, I recommend configuring your SSH entries to open with a playlist. Once the playlist runs and all sessions open, go to the Actions tab and enable "Broadcast all". This ensures that everything you type in the first session is automatically sent to all the others.
Next, you can run your script using the "Execute command from palette" feature. To add one, click the "+" icon to add your script, then search for and execute it. The command will then run across all your sessions simultaneously.
Here's the exact steps for the configuration:
https://docs.devolutions.net/rdm/commands/edit/play-list/play-list-actions/
https://docs.devolutions.net/rdm/kb/how-to-articles/broadcast-actions-in-ssh-sessions/
https://docs.devolutions.net/rdm/kb/how-to-articles/command-palette-ssh/#access-terminal-commands-via-the-command-palette
Please let me know if this approach fits your needs. If you have any other questions, please let us know.
Best regards,
@Maxim Robert
Thanks for the reply. Didn't quite meet my needs though. I should have been more specific. The commands being sent in each SSH session are different. What I need is something that will login to one session, run some commands, log out of that session and login to another session and run some different commands. Then repeat until done. OR - is there a way to send passwords via either post login commands or after open envents, so I could just login to the bastion server, and then it goes through the script of logging into each subsequent server, doing the work and moving on to the next one?
Hello Brad,
Thank you for your response!
What I would suggest is still use the steps I provided for the playlist, but instead of using the broadcasting options, configure your commands to run under Event > After open options in the properties of your SSH session.
https://docs.devolutions.net/rdm/kb/how-to-articles/entry-types-events-settings/#after-open
If you have any further questions, please don't hesitate to let us know.
Best regards,
Maxim Robert