Questions tagged [pty]

A pty is a pseudo-terminal - it's a software implementation that appears to the attached program like a terminal, but instead of communicating directly with a "real" terminal, it transfers the input and output to another program.

362 questions
0
votes
1 answer

Do I need to implement terminal emulation if I have a ptty?

If I have a pseudo terminal given to me (from say a pty-req (http://www.ietf.org/rfc/rfc4254.txt)) do I need to emulate the data coming back, or is that already emulated data?
Zombies
  • 22,793
  • 38
  • 132
  • 216
0
votes
1 answer

Using the linux pseudo terminal API for multiple debug terminals

Ubuntu Linux: How can one acquire a path that refers to the master side of a of a pseudo terminal pair?... the slave side is easy... but the master side only seems to exist as an open file descriptor, but seems not possess a valid Linux path. With…
Peter Li
  • 285
  • 1
  • 2
  • 9
0
votes
1 answer

How to bypass screen/byobu conflicts with zssh file transfers (rz/sz)

I've been trying out zssh's sz and rz because it seems like a quick/easy way to send files back and forth (local <-> remote) over ssh. The problem is that I use byobu (basically screen) on my remote server and this somehow conflicts with the sending…
tester
  • 20,193
  • 21
  • 80
  • 120
0
votes
1 answer

Pseudo terminal to use with ssh in java

I am writing a program to connect to a remote server with ssh and provide the user with a shell terminal. I've tried JSch and sshj -- both can connect properly but just hooking up the input/output streams of their shell channels to System.in and…
wczwe
  • 1
  • 1
  • 2
0
votes
1 answer

sshpass throwing error 'Failed to get a pseudo terminal: Success'

I am trying to run the sshpass tool to automate an sftp action. On another server, the command works, but on this server it just returns one line of error mesage. Here is the command I am using: sshpass -p Password sftp Uname@Host And I get the…
Zech
  • 11
  • 1
  • 3
-1
votes
4 answers

Executing string sent from one terminal in another in Linux pseudo-terminal

Lets say I have one terminal where the output of "tty" is "/dev/pts/2" From another terminal, I want to send a command to the first terminal and execute it. Using: echo "ls" > "/dev/pts/2" only prints "ls" in the first terminal Is there a way to…
Ameet Gohil
  • 93
  • 1
  • 5
-1
votes
2 answers

attach a terminal to a process running as a daemon (to run an ncurses UI)

I have a (legacy) program which acts as a daemon (in the sense it runs forever waiting for requests to service) but which has an ncurses based user interface which runs on the host. I would like to alter the program such that if I connect to the…
Bruce Adams
  • 3,435
  • 3
  • 27
  • 65
-1
votes
3 answers

ncurses newterm following openpty

I am trying to figure out how to do the following: create a new pseudo-terminal open a ncurses screen running inside the (slave) pseudo terminal fork A) forward I/O from the terminal the program is running in (bash) to the new (slave) terminal …
Bruce Adams
  • 3,435
  • 3
  • 27
  • 65
-1
votes
1 answer

How do I correctly shut down a connection to force the client to disconnect after a tty disconnects?

I apologize for the length, but I suspect the bug might be in the error handling and there's a bit of necessary boilerplate for networking. I start the following implementation of a single-file forking tcp server. #include #include…
merlin2011
  • 63,368
  • 37
  • 161
  • 279
-1
votes
1 answer

cant ssh into git: PTY allocation request failed on channel 0

I'm trying to update homebrew but i cant connect to git.. i see the https isnt getting through and when i try to ssh -t i get : PTY allocation request failed on channel 0 these are my results form ssh -v: klein@MacBook-Pro .ssh % ssh -v…
-1
votes
1 answer

xtermjs, few questions regaring the usage

Struggling to get using xtermjs, and have some questions which aren't covered in the official documentation, at least I didn't find. I understand that when I use some app within the terminal, for example, Vim terminal need to be switched to…
Anatoly
  • 4,553
  • 6
  • 42
  • 110
-1
votes
1 answer

How to include «pty.h» Header File on Unix / Add «pty.h» to Standard library C / C++

I would like to include pty.h which is not normally available on Unix (Not included in standard library). On the Internet, you can get the related header file content. So how do you add this header file to the standard library, so that it's possible…
Tthrow
  • 45
  • 4
-1
votes
1 answer

PTY runs with smaller size

I'm writing a simple application to use ptys and run commands such as vi. When they run, regardless of my terminal emulator's size, the pty runs on a very small window; here's a screenshot: https://imgur.com/a/DdRG2Ib the cursor is just outside the…
bicup
  • 195
  • 8
-1
votes
1 answer

How does ssh receive password from tty?

I was wondering how openssh gets the password when login, cause I got stuck in automating entering passwords to the similar tools in linux which requires getting password from tty like ssh. Tried to understand sshpass and found that sshpass forks a…
-2
votes
1 answer

How to solve the pty master write slave read. Master write the data master will also read?

void epoll_func(epoll_event event){ char str[BUFSIZE] = {'\0'}; int c =0; if(event.data.fd == connfd && EPOLLIN){ while(true){ c = read( connfd, str, BUFSIZE); write( 1, str, c); if(c
bob.smart
  • 23
  • 1
  • 5
1 2 3
24
25