LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 04-25-2011, 04:32 AM   #16
athrin
Member
 
Registered: Mar 2011
Posts: 135

Original Poster
Rep: Reputation: 1

Quote:
Originally Posted by EricTRA View Post
Hi,

You do have the function scripts right? And I get the impression you're using this script to copy locally right? Is your SSH server running and set up correctly?

Kind regards,

Eric
function scripts? you mean got some script inside .sh file or inside php file? i think that what i'm lacking right now.
 
Old 04-25-2011, 04:37 AM   #17
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

The ones I referred to earlier and that you are calling from within your code:
ssh2_auth_password
ssh2_scp_send

Kind regards,

Eric
 
Old 04-25-2011, 08:14 PM   #18
athrin
Member
 
Registered: Mar 2011
Posts: 135

Original Poster
Rep: Reputation: 1
oh.. i do have function script.. is my function script correct? right now i want to try sending testing.sh from /var/www/cgi-bin/ to /home

Code:
ssh2_auth_password($connection, 'root', '$ip2');
ssh2_scp_send($connection, '/home/testing.sh', '/var/www/cgi-bin/testing.sh', 0644);
i think my ssh server not running. and i tried run ssh
Code:
ps -ef | grep ssh
nothing running
do i need to configure it all like in this http://www.cyberciti.biz/faq/centos-ssh/
if this not working.. do you know other method to copy file from one server to another server by using browser as the one that ask to enter input?

Last edited by athrin; 04-25-2011 at 11:44 PM.
 
Old 04-26-2011, 12:26 AM   #19
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

If it's not running then you can start it with:
Code:
service ssh start
and if that errors out, install it with yum install ssh.

I'm under the strong impression that you want to use a browser to copy files from one location to the other on the same server. Is that the case? If so, may I ask why you're trying to do it that way?

Kind regards,

Eric
 
Old 04-26-2011, 01:00 AM   #20
athrin
Member
 
Registered: Mar 2011
Posts: 135

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by EricTRA View Post
Hello,

If it's not running then you can start it with:
Code:
service ssh start
and if that errors out, install it with yum install ssh.

I'm under the strong impression that you want to use a browser to copy files from one location to the other on the same server. Is that the case? If so, may I ask why you're trying to do it that way?

Kind regards,

Eric
correction not on the same server. different server. right now just trying to make the server that want to use scp doesnt know his own server.
cant install with yum install ssh. is this ok?
Code:
yum -y install openssh-server openssh-clients

Last edited by athrin; 04-26-2011 at 01:03 AM.
 
Old 04-26-2011, 01:03 AM   #21
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

Sorry, my mistake, I'm more used to Debian, that's why I posted ssh instead of openssh-server. You normally don't have to install the openssh-clients since the client should be already installed, just the server. After installation test it with:
Code:
ssh youruser@localhost
and see if you can log in. I don't think you'll need to do a lot of configuring since you'll be working on localhost level.

Kind regards,

Eric
 
Old 04-26-2011, 01:07 AM   #22
athrin
Member
 
Registered: Mar 2011
Posts: 135

Original Poster
Rep: Reputation: 1
already test it and can run.
now i want use scp to other server with browser.

can i use PEAR libraries??

Last edited by athrin; 04-26-2011 at 02:52 AM.
 
Old 04-26-2011, 08:45 PM   #23
athrin
Member
 
Registered: Mar 2011
Posts: 135

Original Poster
Rep: Reputation: 1
it should working right??
 
Old 04-27-2011, 12:25 AM   #24
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

Sorry to say that now you're stepping into unknown territory for me, I don't no anything about that. I'm sure someone with that knowledge will step in. Good luck.

Kind regards,

Eric
 
Old 04-27-2011, 12:34 AM   #25
athrin
Member
 
Registered: Mar 2011
Posts: 135

Original Poster
Rep: Reputation: 1
hi,

haha.. ok ^_^..
thanks trying to solve this question.

kind regards,
Athrin
 
Old 04-27-2011, 12:35 AM   #26
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

You're welcome. Have fun with Linux.

Kind regards,

Eric
 
Old 04-27-2011, 08:56 PM   #27
athrin
Member
 
Registered: Mar 2011
Posts: 135

Original Poster
Rep: Reputation: 1
wait eric.

i wanna ask about here
Code:
ssh2_scp_send($connection, '/local/filename', '/remote/filename', 0644);
what 0644 port use for?
 
Old 04-28-2011, 12:34 AM   #28
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

That's not a port, those are the permission that will be set on the file. Have a look at this site for more detail.

Kind regards,

Eric
 
Old 04-28-2011, 08:42 PM   #29
athrin
Member
 
Registered: Mar 2011
Posts: 135

Original Poster
Rep: Reputation: 1
i have check on my log_error.. this what it shown
Quote:
PHP Fatal error: Call to undefined function: ssh2_connect() in /var/www/html/ip.php on line 36, referer: http://ip addrs/ip.php
 
Old 04-29-2011, 01:19 AM   #30
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

Just as it states, you're missing the definition for the function ssh2_connect().

Kind regards,

Eric
 
  


Reply



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
help with scp 7mza Linux - Newbie 1 11-23-2009 09:36 AM
scp does not work and gives the following error message: scp: FATAL: Executing ssh1 i akay Linux - Networking 16 09-28-2008 11:41 PM
Scp B-Boy Linux - Newbie 2 07-07-2008 07:17 AM
scp help akhil.mud Programming 6 04-14-2008 08:47 PM
SCP how to the_rhino Linux - Newbie 5 02-11-2005 07:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:00 PM.

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