in reply to TTY screwed when running multiple ssh

Any time you start multiple concurrent IO sessions, you are asking for trouble. Why are you using the -t option? Are you really running some curses-like application? If I run your program without the -t option, I don't see the 'connection closed', and the tty is fine. Remember, just because you are using the -t, all of the concurrent output is coming to your shell/tty. It's like having 5 programs opening the same file for writing at the same time. Results are unpredictable.

Have you considered forking to a perl program using an SSH module? You have more control.

  • Comment on Re: TTY screwed when running multiple ssh

Replies are listed 'Best First'.
Re^2: TTY screwed when running multiple ssh
by jlhsgcib (Novice) on Sep 16, 2008 at 08:42 UTC

    Hi,

    Thanks for your reply and sorry for not replying earlier I moved my home over the weekend.

    As I said in the initial post, I have to use the -t option because the sudo command requires a TTY. It simply doesn't work if no TTY has been allocated unfortunately.

    Regarding the SSH module, I would like to avoid depending on third-party modules as much as possible, that's what I'm calling ssh directly.

    Regards,
    -- Jeremie