I apologize for the confusion. I want to search (grep) files from server B (I would also like to transfer files) using a PHP script from computer A. The only way I was told this could be done was through an ssh connection.
PHP is running in safe mode, however a user was created on computer A to have the same user id, and group id as the owner of the files on server B.
For example if the owner of the files I would like to access on server B is the following when you type id from the command line:
uid=501(userX) gid =1001(mygroup) groups =1001(mygroup)
then the user on computer A has the same information.