PHP warning

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
momi
Forum Newbie
Posts: 1
Joined: Wed Oct 28, 2009 3:03 am

PHP warning

Post by momi »

Hi, I am trying to make some script that ssh to a lot of Linux machines and execute some commands. I am using ssh2 for that. The ip addresses i put to the array, and I am using foreach loop to ssh to everyone ip. Ok I have 30 ip and when a function ssh2_auth_password fails on 10th ip (because I don't know the password), the whole script fails even foreach loop has 20 more ip addresses. It displays: PHP Warning: ssh2_auth_password(): Authentication failed for admin using password. Is there a way to ignore this warning and go to the end of the array?

Thank you
Post Reply