Slow SSH via Expect called from webpage.php
Posted: Thu Feb 03, 2005 12:51 pm
I have a web page ost.php that uses exec (".../ost.exp", $results);
ost.exp was using
send "telnet box23"
expect ...
that changed, now it says:
send "ssh plat@box23"
expect ...
and both methods work just fine.
However, from the command line ost.exp takes 1.2 seconds, from the web page it takes 21 seconds. If I change back to telnet the web page takes about 2 seconds. If from the command line I say >php ost.php it takes 1.5 seconds. Why? And is there anything I can do to fix the extra 19 second delay when going thru the web page?
Tks
ost.exp was using
send "telnet box23"
expect ...
that changed, now it says:
send "ssh plat@box23"
expect ...
and both methods work just fine.
However, from the command line ost.exp takes 1.2 seconds, from the web page it takes 21 seconds. If I change back to telnet the web page takes about 2 seconds. If from the command line I say >php ost.php it takes 1.5 seconds. Why? And is there anything I can do to fix the extra 19 second delay when going thru the web page?
Tks