CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner: Re: [richsark] Help needed for my script: Edit Log


Apr 23, 2009, 11:37 AM

Views: 12724
Re: [richsark] Help needed for my script

Hi rich,

Good news! ssh->login() is not throwing an exception. All of the problems are normal login failures to the remote host. That means that the eval {} block around the login isn't necessary (but you still have to process login's output).

Looking at your program's output, I see 3 reasons your logins are failing:

1. "Could not chdir to home directory /home/richsark: No such file or directory" This means that the richsark user doesn't have a home directory setup on that host. Talk to the system administrator and have him or her create one for you.

2. "richsark's Password:" The user/password you used was rejected by the server. Again, talk to the sysadmin for the host and get that fixed. UPDATE: Another possibility is that the remote host requires a carriage return or something before you get to the login prompt.

Both of the above problems are easiest debugged by ssh'ing from the command line (preferably with the remote administrator on the phone!).

The remaining problems are all about a mismatch between what Expect expected to happen during the login session and what really happened. Basically, you are going to have to "expect" the prompt to enter "yes" (or whatever). If you get it, your script will have to send the proper response. RTM for Expect (I'm sure there's an Expect forum somewhere out there, too). I'm no expert.

Good luck,


(This post was edited by 1arryb on Apr 23, 2009, 11:38 AM)

Edit Log:
Post edited by 1arryb (User) on Apr 23, 2009, 11:38 AM

Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives