Net::SSH Force tty

S

Shawn Jan

Hey guys,

I was wondering if there was a way using the Force pseudo-tty
allocation. If I was just to use SSH, I would use the -t flag, but I
can't seem to find a solution for Ruby anywhere. Any help would be
appreciated!

Shawn
 
B

Bryan JJ Buckley

Umm.. Ruby isn't a shell. Can you please explain what you want to do, exactly?
 
S

Shawn Jan

Bryan said:
Umm.. Ruby isn't a shell. Can you please explain what you want to do,
exactly?

2008/6/20 Shawn Jan <[email protected]>:

Well, I want to use Net::SSH with ruby to excecute some commands via
ssh, but I need the to force the tty. IF I was using a shell, I could
just type ssh -t, so I was wondering if there was a way to do this with
the ssh ruby library.
 
C

Chris Andrews

2008/6/20 Shawn Jan said:
Well, I want to use Net::SSH with ruby to excecute some commands via
ssh, but I need the to force the tty. IF I was using a shell, I could
just type ssh -t, so I was wondering if there was a way to do this with
the ssh ruby library.

It sounds like you need to send a pty request - take a look at:

http://net-ssh.rubyforge.org/ssh/v2/api/index.html

and search for "request_pty" (assuming you're on the current v2
Net::SSH). You might also want to look at Capistrano, for an example
of how this is used - it has a "force pty" option, so you should be
able to see what that does.


Chris.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top