-1

A number of questions are related to using SSH with Windows terminal and a few others are related to opening multiple, equal sized panels side-by-side. None of these questions actually offers an answer to achieve the desired result (see title).

Some outdated answers say it's not possible, but after a recent update it now should be.

This answer explains how to open multiple equal-sized panes side-by-side. However, it does not explain how to execute a command within those newly opened panes.

Mitchell van Zuylen
  • 3,905
  • 4
  • 27
  • 64
  • Question marked as closed and linked to a answer already linked within this question. As stated in the original question, the linked answer does not provide information on how to automatically provide the intended behavior of this question, but it does provide a clue towards the intended behavior. It was non-trivial for me as a novice to Windows Terminal and I can only imagine it can be for others too. – Mitchell van Zuylen Nov 05 '21 at 00:24

1 Answers1

-1

Based on the answer by tkit on this question,, which explains how to open multiple panels side-by-side. We can include a SSH command as follows:

wt -M ssh user@ip.address -p 10077; split-pane -V ssh user@ip.address; move-focus left; split-pane -H ssh user@ip.address; move-focus right; split-pane -H ssh user@ip.address

This gives the following result:

enter image description here

Explanation of the command:

wt opens a Windows Terminal. After this flags can be used such as -M to maximize the window. Following this follows the command, ssh commands in this case. Flags can follow the given command, here -p for port number on the ssh command. The ; splits commands given to wt. split-pane results in a -V vertical panel split. move-focus changes the currently focused. Without move-focus we would end up with panels at size 50%, 25%, 12.5% and 12.%

Mitchell van Zuylen
  • 3,905
  • 4
  • 27
  • 64