I use Cmder to log into SSH with multiple tabs. I always run the same commands on each of them. I tried automating it, but Cmder always tries to run the commands from my local cmd.exe
rather than the ssh sessions I currently have open in my tabs. Is there any way to automatically execute commands in these tabs (I have a different set of commands per tab)?
Asked
Active
Viewed 982 times
0

Michał Zawadzki
- 695
- 6
- 14
-
The question is not related to ConEmu. It's about your ssh client. In the question you have not said which client you use. Anyway, perhaps this article could help https://conemu.github.io/en/CygwinStartCmd.html – Maximus Aug 26 '20 at 11:17
1 Answers
0
It looks like you just specify the command after the ssh stanza: ssh usr@addr "shell commands here". I've managed to set up the tasks like so:
>* -cur_console:d:"C:\Program Files\cmder" -cur_console:t:"my_log" -cur_console:C:"C:\Program Files\cmder\icons\cmder.ico" %ConEmuDir%\..\git-for-windows\usr\bin\ssh.exe user@addr "tail -n 200 -f /var/log/my_log.log"
You can copy-paste above code within one task definition and it will open multiple tabs ( just change the tab name & bash command).

Michał Zawadzki
- 695
- 6
- 14