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.
In reply to Net-SSH-Expect & Fedora-18 by hardy004
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |