hardy004 has asked for the wisdom of the Perl Monks concerning the following question:
I am seeing an issue when using Net-SSH-Expect to SSH a linux Fedora-18 system. Specifically, I am seeing issue when I send the command “reboot” over SSH to the linux host to reboot the system.
Below is the sequence of commands I send.
1.Create a new Net::SSH::Expect connection.
2.Send a sample command to the remote linux host to make sure the connection is OK.
3.Send ‘reboot’ command over SSH. The command “reboot” also goes through perfectly fine.
4.After sending any command, I typically do ‘waitfor’ in Expect.pm & this is where the issue is observed.
5.‘waitfor’ calls ‘_sec_expect’ function again in Expect.pm, which throws down the below error.
3:Child PID 3328 exited with status 65280
The $before variable shows this. Connection to 192.168.200.1 closed by remote host. Connection to 192.168.200.1 closed.
Could anyone please advice on why i am seeing this error ? Shouldn't we expect the connection to close down after reboot is issued ?
To me looks like Expect.pm is expecting that the connection should be already there even after the reboot command is send.
Note that the issue was not observed with Fedora-14.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net-SSH-Expect & Fedora-18
by roboticus (Chancellor) on Jul 02, 2014 at 00:12 UTC | |
by hardy004 (Novice) on Jul 02, 2014 at 02:55 UTC | |
by RonW (Parson) on Jul 02, 2014 at 17:02 UTC | |
by hardy004 (Novice) on Jul 02, 2014 at 20:41 UTC | |
by RonW (Parson) on Jul 02, 2014 at 21:13 UTC | |
| |
by roboticus (Chancellor) on Jul 02, 2014 at 21:11 UTC | |
|
Re: Net-SSH-Expect & Fedora-18
by oiskuu (Hermit) on Jul 02, 2014 at 16:37 UTC |