$ssh->scp_put($firmware[$antenna_type],'/tmp/fwupdate.bin'); print "Upgrading firmware, this will take about 3 minutes.\n"; my $chan = $ssh->channel(); $chan->exec("/sbin/fwupdate -m\n"); $chan->close;