ssh, option -t - SSH

This is a discussion on ssh, option -t - SSH ; when connecting from command line with ssh i get the waiting prompt, login and logout messages and colorized file names, as expected. locally I'm using OpenSSH (over MacOSX 10.4.11) and remotly dropbear. however, when connecting using a ruby script (doing ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: ssh, option -t

  1. ssh, option -t

    when connecting from command line with ssh i get the waiting prompt,
    login and logout messages and colorized file names, as expected.

    locally I'm using OpenSSH (over MacOSX 10.4.11) and remotly dropbear.

    however, when connecting using a ruby script (doing "the same" as from
    cli) i don't get those (prompt colors and logout message) even if i use
    the -t option. Apart from that, any command works well.

    on stderr i get :
    Pseudo-terminal will not be allocated because stdin is not a terminal.

    using my ruby script i don't see any escape sequence nor control
    characters (except \r and \n).

    the purpose of my ruby script is to get a connection whithin a window of
    my app.

    then i wonder what should i do in order to get the waiting prompt and
    escape sequences ?

    I've read various rfcs (4251-4) but those didn't help me much.

    where could i find info upon using ssh from an UI point of view ?
    --
    Une Bévue

  2. Re: ssh, option -t

    In article
    <1imp96s.xruodk1oczb1qN%unbewusst.sein@weltanschauu ng.com.invalid>
    unbewusst.sein@weltanschauung.com.invalid (=?ISO-8859-1?Q?Une_B=E9v?=
    =?ISO-8859-1?Q?ue?=) writes:
    >when connecting from command line with ssh i get the waiting prompt,
    >login and logout messages and colorized file names, as expected.
    >
    >locally I'm using OpenSSH (over MacOSX 10.4.11) and remotly dropbear.
    >
    >however, when connecting using a ruby script (doing "the same" as from
    >cli) i don't get those (prompt colors and logout message) even if i use
    >the -t option.


    'man ssh':

    -t Force pseudo-tty allocation. This can be used to execute arbi-
    trary screen-based programs on a remote machine, which can be
    very useful, e.g. when implementing menu services. Multiple -t
    options force tty allocation, even if ssh has no local tty.

    Note the last sentence.

    --Per Hedeland
    per@hedeland.org

  3. Re: ssh, option -t

    Per Hedeland wrote:

    >
    > Note the last sentence.


    yes, fine, thanks, I've discovered that point too, in the mean time, and
    forgot to mention here....

    right now every thing is working fine, i'm even able to "simulate" from
    a ruby script an interactive ssh session.

    i didn't see any -t -t (or -tt) option for ssh-add thought, i need also
    asking the passphrase trhu a pseudo-terminal

    except one little problem, not related to "comp.security.ssh" :
    tcgetattr: Inappropriate ioctl for device

    when using :
    system "stty cbreak isig"
    and STDOUT in sync mode

    any idea ?

    i'm quit a newbie for tty setup...
    --
    Une Bévue

+ Reply to Thread