Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-21-2011, 11:08 PM   #1
Registered: Mar 2011
Posts: 135

Rep: Reputation: 1
php combine wth scp

i just want ask. can php pass ip or password to scp? example the user enter ip and password of server and those ip and password been sent inside bash and scp receive the input. can it work?

Last edited by athrin; 04-21-2011 at 11:36 PM.
Old 04-22-2011, 12:54 AM   #2
Senior Member
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
Yes you can pass data from PHP as arguments to scp or any other program. You might find it a bit more efficient to look through the PEAR modules for something that does scp.
Old 04-22-2011, 01:04 AM   #3
Registered: Mar 2011
Posts: 135

Original Poster
Rep: Reputation: 1
oh really?? how to do it?
do you got any suitable link that related to this?
if dont have post the command here..

Last edited by athrin; 04-22-2011 at 04:13 AM.
Old 04-24-2011, 11:28 PM   #4
Registered: Mar 2011
Posts: 135

Original Poster
Rep: Reputation: 1
hello.. does anyone here know how to solve this?
Old 04-24-2011, 11:56 PM   #5
Registered: Mar 2011
Posts: 135

Original Poster
Rep: Reputation: 1
this is php code on how i pass the ip and pword
<html><head><title>Enter Details

<form name="detailfrm" method="post" action="">
    <td>Enter Ip</td>
    <td><input type="text" name="ip1"></td>
    <td>Enter password</td>
    <td><input type="text" name="ip2"></td>
    <td><input type="submit" value="Submit" name="detailbtn"></td>



system("/var/www/cgi-bin/ $ip2 $ip1");
in my sh file it receive the ip and pword but i just dont know how to store my pword there.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
SCP a file to diff directory/change filename using PHP or call sh script fm PHP nuebelhor Red Hat 1 11-05-2009 09:03 AM
scp does not work and gives the following error message: scp: FATAL: Executing ssh1 i akay Linux - Networking 16 09-29-2008 12:41 AM
PHP - how can you combine two images into one? BrianK Programming 4 06-03-2007 09:59 AM
PHP & GD Library - Combine Two Images wh33t Programming 1 11-29-2005 10:12 AM
Errr, WTH is going on with this???? fatgod Linux - General 5 09-10-2003 06:30 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:36 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration