close_slave_pty => 0 When a pseudo pty is used for the stdin stream, the slave side is automatically closed on the parent process after forking the ssh command. This option disables that feature, so that the slave pty can be accessed on the parent process as $pty->slave. It will have to be explicitly closed (see IO::Pty).