Sponsored Content
Full Discussion: Remote Login error in Perl
Top Forums Shell Programming and Scripting Remote Login error in Perl Post 302432319 by nurani on Thursday 24th of June 2010 05:33:55 PM
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
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
CatalystX::SimpleLogin::TraitFor::Controller::Login::WitUseriContributed PerCatalystX::SimpleLogin::TraitFor::Controller::Login::WithRedirect(3pm)

NAME
CatalystX::SimpleLogin::TraitFor::Controller::Login::WithRedirect - redirect users who login back to the page they originally requested. SYNOPSIS
package MyApp::Controller::NeedsAuth; use Moose; use namespace::autoclean; # One needs to inherit from Catalyst::Controller in order # to get the Does('NeedsLogin') functionality. BEGIN { extends 'Catalyst::Controller'; } sub inbox : Path Does('NeedsLogin') { # Redirects to /login if not logged in my ($self, $c) = @_; $c->stash->{template} = "inbox.tt2"; return; } # Turn on in config MyApp->config('Contoller::Login' => { traits => 'WithRedirect' }); DESCRIPTION
Provides the "login" action with a wrapper to redirect to a page which needs authentication, from which the user was previously redirected. Goes hand in hand with Catalyst::ActionRole::NeedsLogin WRAPPED METHODS
redirect_after_login_uri Make it use and extract "$c->session->{redirect_to_after_login}" if it exists. METHODS
$controller->login_redirect($c, $message) This sets the error message to $message and sets "$c->session->{redirect_to_after_login}" to the current URL. SEE ALSO
CatalystX::SimpleLogin::Controller::Login CatalystX::SimpleLogin::Form::Login AUTHORS
See CatalystX::SimpleLogin for authors. LICENSE
See CatalystX::SimpleLogin for license. perl v5.14.2 2012-07-CatalystX::SimpleLogin::TraitFor::Controller::Login::WithRedirect(3pm)
All times are GMT -4. The time now is 02:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy