Dashboard
PHP:
8.3.33
OS:
Linux
User:
letter7
/
/
usr
/
share
/
doc
/
perl-Net-OpenSSH
/
examples
📤 Upload
📝 New File
📁 New Folder
Close
Editing: net-telnet.pl
#!/usr/bin/perl use strict; use warnings; use Net::OpenSSH; use Net::Telnet; $Net::OpenSSH::debug = -1; my $ssh = Net::OpenSSH->new('localhost'); my ($fh, $pid) = $ssh->open2pty(); my $conn = Net::Telnet->new(Fhopen => $fh); my @lines = $conn->cmd("find /tmp"); print @lines; my @lines1 = $conn->cmd("ls"); print "\n\nls:\n", @lines1;
Save
Cancel