Problem ssh login from PHP webapp using expect script

General discussions related to php

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Mon Jan 28, 2013 4:51 am

Problem ssh login from PHP webapp using expect script

Postby msandeep12 » Mon Jan 28, 2013 5:02 am

I m using a Php program ,which on click triggers a shell script ,with in which it try to ssh to remote host and login.. to pass the password for ssh to remote host ,i m using expect script(whihc supplies the password)
when i run this script through shell command line it works perfectly.but when i use the php web program it is not working .the expect script triggers ssh to remote host but password is not supplied .

expect script which is triggered by shell script

spawn ssh -t IPAddress
expect "*?assword:*"
send "password\r"

PHP script

passthru('/<pathto script>/wrapper.exp>wrapper.log');


the above php is triggered by html for on click

Thanks in advance
Sandeep M

Return to “PHP General”

Who is online

Users browsing this forum: Google Adsense [Bot] and 5 guests