The probably easiest way is to run keyfile SSH auth instead of password and get the output that way...
ssh cluster 'command'
For example on my vSIM:
pstejska@PSTEJSKA03-PC:/mnt/c/Users/pstejska$ vsim version
Access restricted to authorized users
Last login time: 12/17/2021 20:17:10
NetApp Release 9.10.1RC1: Wed Oct 27 02:46:19 UTC 2021
pstejska@PSTEJSKA03-PC:/mnt/c/Users/pstejska$
As you can see, no password needed. If you get fancier with bash you can do more.
Note: I just use WSL for this and it works perfect.