• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: pty-redir: Slave, Master, and how it all works
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pty-redir: Slave, Master, and how it all works


  • Subject: Re: pty-redir: Slave, Master, and how it all works
  • From: John Davidorff Pell <email@hidden>
  • Date: Mon, 2 May 2005 23:57:02 -0700

ok, it seems like I got the pty/tty mess backwards. What I'm trying to do is this:

Establish an ssh connection from local to remote.
On remote, exec someCoolPtyTtyTool.
On local, exec someCoolTtyPtyTool /bin/bash.
Physically walk to remote. Sit down in front of remote.
On remote (the computer I'm currently sitting at), exec screen /dev/ ttyXX or screen /dev/ptyXX.
While sitting at remote, have a shell on local.


I call it reverse-ssh. I'm not looking for a port-forwarding solution. iThink that ttys and ptys are my solution, but I just can't seem to wrap my mind around them.

Help is always appreciated! :-)

JP


On 2 May 2005, at 04:45, Pelle Johansson wrote:

John Davidorff Pell wrote / skrev:

I want to start a shell on a pty, then attach to the tty (using screen (1), for example), pop, have a shell. Screen(1) has the wonderful ability to attach to a specified tty! :-) Yay! Ok, that side is done, since I use screen(1) already. pty-redir(1) is intended to do the other side. The code I'm using is posted here [1]. The virgin 0.1 release exhibits the same problem, and 0.2 is debian specific. The code at [1] is a merger of the two. :-)

You seem a bit confused about how ptys work. Shells don't run on ptys, they run on ttyps. Terminal emulators such as screen and remote terminal servers such as sshd run on ptys. screen also has the ability to attach to another tty as a relay, but that's mostly meant to talk to modems.

Is it a reattachable shell you want? (similar to screen). That is done by starting a daemon that attaches to a pty, and starting a shell on the tty. You then use whatever method you wish to connect to the daemon (most likely a socket, telnet protocol might be appropriate) which relays the data to the pty. I guess you could also open a second pty, attach to the corresponding tty with screen, and relay the data between the ptys. It would then be similar to talking through a modem connection.

One could imagine using pty-redir for the lat option. You just have to make it start some other program on another pty that starts the final one on the matching tty.
--
Pelle Johansson
<email@hidden>


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >pty-redir: Slave, Master, and how it all works (From: John Davidorff Pell <email@hidden>)
 >Re: pty-redir: Slave, Master, and how it all works (From: Pelle Johansson <email@hidden>)

  • Prev by Date: calling open() on an older cd device returns EBUSY??
  • Next by Date: Re: Tiger and libreadline
  • Previous by thread: Re: pty-redir: Slave, Master, and how it all works
  • Next by thread: DiskArbitration API
  • Index(es):
    • Date
    • Thread