Re: Net::SSH::Perl sending output to STDOUT

From: Martin Kissner (news_at_chaos-net.de)
Date: 02/09/05


Date: Wed, 9 Feb 2005 00:54:12 +0100

ryanmhuc@yahoo.com wrote :
> Thanks for the script but it does the same thing.

What same thing?

> If the password is
> incorrect for the login i get:
> "Permission denied at test.pl line 43"
> and then it stops the program.

What do you expect? If the pw is incorrect you should't be able to log
in, should you?

> The issue is I need to catch this. The
> script I'm trying to create logins into about 16 different servers.
> These servers passwords are not supposed to change but every once in a
> while one does. I want the program to not die when it can't login to
> the server but instead trap it, let me know and then continue with the
> script.

Then you should probably check for success.
if (your command) {
        do stuff;
}
else {
        do other stuff;
}

btw:
You'd probably increase your chances of getting qualified help by
avoiding TOFU quoting an providing some code example.

HTH
Martin

[ TOFU snipped ]

-- 
perl -e 'print 7.74.117.115.116.11.32.13.97.110.111.116.104.101.114.11
.32.13.112.101.114.108.11.32.13.104.97.99.107.101.114.10.7'


Relevant Pages

  • Re: login script failing?
    ... Well if all DCs are in same site/local lan, and only some mappings ... If you manually run that script after user logs on does the mapping occur? ... How do you know whch servers are the users logging on? ... relevant servers but no matter what I put in the login script, ...
    (microsoft.public.windows.server.active_directory)
  • Re: login script failing?
    ... How do you know whch servers are the users logging on? ... do not 'see' the login cmd box appear in the system tray area when I ... relevant servers but no matter what I put in the login script, ... and even h: fails occasionally. ...
    (microsoft.public.windows.server.active_directory)
  • Re: login script failing?
    ... this because the users should use randomly all servers and not just one. ... Well if all DCs are in same site/local lan, and only some mappings fail.... ... If you manually run that script after user logs on does the mapping occur? ... relevant servers but no matter what I put in the login script, ...
    (microsoft.public.windows.server.active_directory)
  • set logintimeout from ssh-client ?
    ... The list of servers I login to, ... causing the script to hang indefinately because it is ... Using openssh OpenSSH_3.2.2p1. ...
    (comp.security.ssh)
  • Re: Hacker activity?
    ... >login to a server, most as root but some are attempts to login to ... >telnet, all come from the same remote server, and all fail. ... >getting some odd cgi calls to a script on a secure ssl server. ... Make sure root cannot login to your system via ssh. ...
    (freebsd-questions)