Jump to content

PHP exec rsh command


jtanmay

Recommended Posts

Hi all,

 

I am working on a project which needs to execute rsh command from php.

 

I have tried running the rsh command from my command line, which does execute the command on the remote host, but when I run the same command using exec command in php, it returns me error code 1 and null result.

 

Below is some sample code.

 

exec(rsh remotehost -l username pwd)

 

Any ideas or setting I need to make?

 

Thanks in advance

Link to comment
Share on other sites

  • 6 years later...

Hello.

I have the same problem.

I think it is because of the user.

root user was given the rights for access to remote server, but I do not know which user run the script, so the user is not given the rights for accessing the server.

Have you solved the problem?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.