This runs an interactive shell session on the host, rathern than
running `sh -c ""' on it.
Evidently ssh checks for the presence of a command line specification
after (foolishly, but now historically unavoidably) concatenating all
the command line arguments with spaces in between.
Turn ssh host "" into ssh host " " which is the expected no-op.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
my ($stdin,$stdout,$user,$ho,$tcmd,$timeout,$extrasshopts) = @_;
$timeout=30 if !defined $timeout;
target_adjust_timeout($ho,\$timeout);
+ $tcmd = ' ' if $tcmd eq ''; # ssh host '' logs in !
tcmdex($timeout,$stdin,$stdout,
'ssh', sshopts(), @{ $extrasshopts || [] },
sshuho($user,$ho), $tcmd);