[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: When to use Interactive (PTY) or Non-Interactive
[Thread Prev] | [Thread Next]
- Subject: Re: When to use Interactive (PTY) or Non-Interactive
- From: Jakub Jelen <jjelen@xxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Tue, 23 Jun 2020 21:28:30 +0200
- To: libssh@xxxxxxxxxx
On Tue, 2020-06-23 at 16:19 +0000, V Sidnal, Nagraju wrote: > Dear All, > > As LibSSH supports both, Interactive(PTY) and non-interactive > approach to EXECUTE command on remote server/Machine. > I would like to know when to opt for Interactive or Non-interactive.? > On what basis, we need to decide which one to opt for? What are the > pro and cons? If you use interactive PTY, you will need to communicate with the remote terminal and interpret terminal control characters, which are in really useful only for interactive shell sessions. If you are interested only in running some command and getting text outputs, you should be fine without PTY. Note, that some application require interactive sessions (for example openssh password prompts or sudo prompts), generally to have better confidence that user is really requesting that action, but it is probably not your case. Regards, -- Jakub Jelen Senior Software Engineer Security Technologies Red Hat, Inc.
When to use Interactive (PTY) or Non-Interactive | "V Sidnal, Nagraju" <nagraju.sidnal@xxxxxxxxxxx> |