in reply to How to Read file from remote machine?

We need a more detailed description of your problem in order to help you effectively.

Specifically, which network services allowing remote access to the file system are available on the server and also which operating system run in both the client and the server.

  • Comment on Re: How to Read file from remote machine?

Replies are listed 'Best First'.
Re^2: How to Read file from remote machine?
by dilip.patel (Initiate) on Jul 21, 2014 at 12:33 UTC

    On both client and server side it having Linux operating system. I have implemented it by using Net::SSH::Expect

    #!/usr/bin/perl -w use strict; use Net::SSH::Expect; use Data::Dumper; my ($host,$user,$password) = ('172',"abc","xyz",); my $ssh = Net::SSH::Expect->new( 'host'=>$host, 'user'=>$user, 'password'=>$password, 'timeout' => 20 ); my $login_output = $ssh->login(); my $file = "/foo/boo"; $ssh->send("cat $file"); while (my $line = $ssh->read_line()) { print "Doing operation on $line\n"; }

    But it is very slow, takes too much time to get connect with remote server and also take time to do "cat" of large file(~200mb).