128 reputation
8
bio website
location
age 23
visits member for 3 years, 7 months
seen Jan 10 '13 at 9:54

Dec
13
awarded  Popular Question
Jan
12
awarded  Teacher
Jan
10
answered SSH Duplicates Text With Forced PTY
Jan
10
awarded  Commentator
Jan
10
comment SSH Duplicates Text With Forced PTY
Working around the isatty values is pretty easy. Essentially, if at any of stdout, stderr or stdin returns true for isatty() for the wrapper, I just tack on a "/bin/cat |" to the front (stdin) or " | /bin/cat" to the back for stdout and stderr with some exec magic for the latter. Although kludgey, it works for all sh compatible shells. The only problem at this stage is that SSH PTY allocation insists on echoing text back to the screen when I force it with -tt which is what I need a solution for.
Jan
10
comment SSH Duplicates Text With Forced PTY
Off the top of my head, ls's colorization looks at whether or not stdout is a TTY, and dialog uses stderr by default to draw dialogue boxes and controls. Honestly, I cannot think of any other programs whether this is the case, but the whole point of the wrapper is to be able to integrate any remote SSH command into a local pipe such that the behaviour is virtually identical, and making the isatty returns identical is important to ensure this. Contrived example: echo "X" | ls --color shows color, but echo "X" | ssh server.tld ls --color does not, and forcing the tty makes dupe text.
Jan
10
comment SSH Duplicates Text With Forced PTY
I thought that was covered by my response. Locally, various program may change behaviour depending on whether or not you do A | program, program | B, A | program | B or A | program | B 2> error.log, etc. I need to be able to wrap any program so that the command so that it behaves the same way way in middle of a pipe even if it's across SSH.
Jan
10
comment SSH Duplicates Text With Forced PTY
In what I have seen, I figured there probably is not an elegant solution to this problem. Right now, I am resorting to creating a pty, spawning ssh with the pty configured for stdin and forwarding all stdin from the parent process to the ssh client. I am trying to wrap the ssh client so that when the ssh client is used in a pipe, on the remote server, the called process sees the same values for isatty on std(in|out|err) that it would see if it were in a pipe series locally.
Jan
9
asked SSH Duplicates Text With Forced PTY
Apr
13
awarded  Supporter
Apr
13
comment Selecting Interface for SSH Port Forwarding
Awesome, thank you! I really wish the man page for ssh(1) stated that clientspecified was needed instead of just saying "enabled": "Specifying a remote bind_address will only succeed if the server's GatewayPorts option is enabled (see sshd_config(5))". From that, I thought it just needed to be set to yes.
Apr
13
accepted Selecting Interface for SSH Port Forwarding
Apr
13
asked Selecting Interface for SSH Port Forwarding
Oct
2
awarded  Promoter
Sep
28
awarded  Student
May
17
comment Git Server on Shared Hosting
That requires me to install git. Shared hosting means no command line access, just SFTP and a web control panel. I need something that I can upload as CGI scripts.
May
17
comment Git Server on Shared Hosting
I don't want to host it on github, because I want a repository for personal / private files. I want to host a repository on my server with shared hosting-- that means Ihave no terminal access.
May
16
awarded  Editor
May
16
revised Git Server on Shared Hosting
typo
May
16
asked Git Server on Shared Hosting