Remote Login error in Perl


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Remote Login error in Perl
# 1  
Old 06-24-2010
Remote Login error in Perl

Hi,


This is in PERL.

I am trying to remotely login to a server to access and grep a log file.

This is what I have defined in my Hash

Code:
%servers = ('box1' => 'userid1', 'box2' => 'userid2',
                 'box3' => 'userid3', 'box4' => 'userid4');
 
%log     = ('box1' =>  '/abc1/xyz1/log', 'box2' =>  '/abc2/xyz2/log',
               'box3' =>  '/abc3/xyz3/log', 'box4' =>  '/abc4/xyz4/log');

Now I execute the following command

Code:
$output=`remsh $m -l $servers{$m} "ls -l $log {$m}/print_*$year$month$day*" `;

and I get " remshd: Login incorrect" message.

I tried different id's and passwords that I can use and it still is the same.

Question :- Is the syntax correct (no compile errors though) and How do I code the statement correctly?

Running out Ideas here.

Thanks

Last edited by Scott; 06-24-2010 at 06:40 PM.. Reason: Code tags
# 2  
Old 06-24-2010
Do you have your rsh configured properly on all these boxes? i.e., if you run the following command on your command line:

Code:
> remsh box1 -l userid1 ls

It should show you the listing of home directory for userid1 on box1.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

Login Oracle from remote xp

Hi dear all, I have installed ORACLE 11g on RHEL-4, where the RHEL is installed on VM. ORACLE is working fine on RHEL but i am not able to connect oracle on my XP. how can i? (1 Reply)
Discussion started by: akhaliq22
1 Replies

2. Solaris

how to login with ssh to remote system with out applying the remote root/usr password

how to login with ssh to remote system with out applying the remote root/user password with rlogin we can ujse .rhosts file but with ssh howits possible plz guide (2 Replies)
Discussion started by: tv.praveenkumar
2 Replies

3. Linux

How to find remote Linux box login account without login in to that box?

Hi, How to find remote Linux box login account without login in to that box? I don't have login account at my remote Linux box. But I need who are all having login account. How do I findout? Thanks, --Muthu. (3 Replies)
Discussion started by: Muthuselvan
3 Replies

4. Shell Programming and Scripting

Remote Login in to another Terminal

hi all , i need the command for remote login in to another terminal, came accross by using "tty" command. please suggest and help me out in this. Regrds Sridhar. (1 Reply)
Discussion started by: Sridhar_dev
1 Replies

5. Shell Programming and Scripting

Remote login through ssh

Hi , I need to login to remotemachines through ssh and move some logfiles to my localmachine. My servername,username and password will be store in the .profile file. can any one please help me in this? This will be a cronjob so Password can't be enter at run time. Thanks in advance Subin (5 Replies)
Discussion started by: subin_bala
5 Replies

6. UNIX for Dummies Questions & Answers

Remote login with VNC

Hi Everyone, Well I am not sure if this right forum. I have install Redhat 5 enterprise. I have everything running. I have configured vncserver. Starts with out errors. I am trying to connect for a XP machine to my RedHat server. I can connect from my XP machine through VNC viewer but I get... (1 Reply)
Discussion started by: Peterh
1 Replies

7. UNIX for Dummies Questions & Answers

Remote login/copy command throwing an error

Hi We had 3 server -hp112and hp146 here hp112 is production server and hp146 is staging server used for load. when i am trying to run follwing command rcp abc hp112:/dnbusr1/gbid/gbid02 it's trowing an error :- remshd: Login incorrect. But same command is working wise versa - rcp abc... (1 Reply)
Discussion started by: ashish_panpalia
1 Replies

8. Shell Programming and Scripting

Login to a remote solaris machine as superuser through perl

I am trying to write a perl script that will do remote machine. I have done user loging using simple command; $telnet->login('test', 'test123'); But now I want to do root login or superuser login. So I tried the superuser command, $telnet->cmd("su"); But I am not able to send the... (0 Replies)
Discussion started by: james2
0 Replies

9. Shell Programming and Scripting

remote login

Hi i have recently switched to unix environment,i am trying to make a shell script which logs on to the remote machines and plays some commands and collects the out put into a file.but i am not able to create any file on remote hosts.see the sample code . rsh hostname -l username << ENDTAG... (4 Replies)
Discussion started by: Raom
4 Replies

10. UNIX for Dummies Questions & Answers

Remote Login (Unix)

Is there any way I can disallow remote login on a m/c (3 Replies)
Discussion started by: DPAI
3 Replies
Login or Register to Ask a Question