Hi Irfan,
Assuming we are using the same ssh, isn't the login name for ssh is supplied using the "-l" parameter (lowercase L)? Give it a try on the command line before putting it in the script so that you can figure out what is wrong easier.
Ray Irfan J Sayed (isayed) wrote:
Hi, In my case, the user with which I am executing the script is not there in sudoers file. So I did in the following manner. #!/usr/bin/perl open FILE, "server_list" or die $!; while(<FILE>) { print "the host is: $_"; chomp; system "ssh [EMAIL PROTECTED] /home/cgadgil/avm2.1/launchtomcat.sh"; } close FILE; if($?){ print "error \n"; exit 1;} else { print "success\n";} But it says : [EMAIL PROTECTED] test]$ perl ssh_test1.pl the host is: 172.21.58.149 ssh: cgadgil: Name or service not known Error Any help
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/