sshMultiCommand method
Implementation
List<String> sshMultiCommand({
required bool ipv6,
required String sshTarget,
required List<String> commands,
bool addHostToKnownHosts = false,
String endCharacter = ';',
}) =>
[
'ssh',
'-o',
'BatchMode=yes',
if (addHostToKnownHosts) ...[
'-o',
'StrictHostKeyChecking=accept-new',
],
if (ipv6) '-6',
sshTarget,
...commands.map(
(e) => e.trim().endsWith(' $endCharacter') ? e : '$e$endCharacter'),
];