my $t = Net::SSH2::Cisco->new( [...] prompt => '/(?m:^ [...] s*$)/'; # or whatever matches your prompt );