ssh, option -t

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
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 Bvue

Re: ssh, option -t

In article (=?ISO-8859-1?Q?Une_B=E9v?=
 =?ISO-8859-1?Q?ue?=) writes:
Quoted text here. Click to load it

'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

Re: ssh, option -t

Quoted text here. Click to load it

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 "" :
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 Bvue

Site Timeline