my $channel = $ssh2->channel(); $channel->blocking(0); $channel->pty(1); #set tty $channel->shell(); sleep 10; #required as the CUCM CLI is slow to start $channel->write("show account\n"); sleep 5; #Again the CLI is kind of slow my $output; $channel->read($output,128); print "Account details:\n $output\n";