emulating an ANSI terminal ?

U

Une Bévue

I'd like to emulate an ANSI terminal from Ruby[Cocoa] using ssh.
Do you know of gem helper for that purpose ?

For the time being, I'm able to emulate a pseudo-terminal connection
even if ssh answers :
Pseudo-terminal will not be allocated because stdin is not a terminal.

However, when executing a remote command, i never knows when the answer
ended.

I've found some kind of workaround executing another command, like that:

ssh=IO.popen("ssh -p 2222 root@#{TT_IP} 2>&1","r+")
ssh.puts aCommand
sleep 0.1
ssh.puts "echo END_OF_COMMAND"

then, from "END_OF_COMMAND" i know when to stop #gets :

output=[]
while(line=ssh.gets) do
break if /END_OF_COMMAND/===line
output<<line.chomp
end


that's working fine for ssh but not for ssh-agent and/or ssh-add, and
I'd like to authentify using ssh-add from UI.

Notice i know how to do that from command line, but not from UI.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,158
Messages
2,570,882
Members
47,414
Latest member
djangoframe

Latest Threads

Top