Working with ptys is kind of tricky, you'll want a program that specializes in that, like expect or maybe even something like tmux.
https://en.wikipedia.org/wiki/Expect https://en.wikipedia.org/wiki/Tmux If you're working with tmux, for example, you can use tmux send-keys to "type" things into your ssh session. https://ricochen.wordpress.com/2011/11/14/tmux-techniques-by-example/ looks like it has some plausible examples of this. I hope this helps, -- Raul On Fri, Mar 2, 2018 at 8:14 PM, Omar Passos Torres de Almeida <omar...@gmail.com> wrote: > Hi > How can i interact with a task like ssh using task.ijs (spawn or shell)? > eg. > > load 'task' > password=. 'mypassword' > process=. shell 'ssh lo...@myhost.org' > > How to send the password? and then interact with the pty? > login@host$ ls -la > Is there some way to do that? > > Thanks in advance, > Omar > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm