hi ,
is there any way to write a PHP program for SSH.
I want to establish a SSH connection and work some commands in the remote system and close the connection.
Yes, just do this (uses an SSH key file):
<?php echo "Executing remote command...<br />"; echo `ssh -i /path/to/key/file user@host ls /tmp`; echo "Done executing remote command.<br />"; ?>
Use an SSH key file so you won't have to provide a password. I do this all the time for system administration, works great for inter-host communication.
--Dave
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php