$cli = new Control::CLI( Use => 'SSH', Timeout => 30, ); $cli->connect( Host => $host, Username => 'abc', Password => 'pass', ) or do { print "\tSSH connection to server ($host) could not be established\n"; exit; } $cli->login( Username => 'IJAF', Username_prompt => 'unique ID[:>]\s*$', ) or do { print "\tCould not get prompt from server ($host)\n"; exit; } print "\tSSH connection to server ($host) established!\n"; $output = $cli->cmd("clear"); ...