or download this
close_slave_pty => 0
When a pseudo pty is used for the stdin stream, the slave side is auto
+matically closed on the parent process after forking the ssh command.
This option disables that feature, so that the slave pty can be access
+ed on the parent process as $pty->slave. It will have to be explicitl
+y closed (see IO::Pty).