sendCmd("ls -alF"); /* * The return result is an array with lines read from stdin */ $outputArray = $transport->readAll(); /* * Let's copy our sshd_config to the remote host. */ $transport->sendFile("/etc/ssh/sshd_config", "/etc/ssh/sshd_config", 0644); /* * Close this session. */ $transport->close(); /* * Create a new ssh session with pubkey authentication. */ $transport = FroxlorSshTransport::usePublicKey("test.froxlor.org", 22, "testUserSSh", "/path/to/pubkey.key", "/path/to/private.key", "myPassphrase1337"); /* * Clean up and finish. */ $transport->close(); ?>