NYCPHP Meetup

NYPHP.org

[nycphp-talk] SSH2_CONNECT

Hans Zaunere lists at zaunere.com
Thu Jul 30 16:13:45 EDT 2009


> Are you sure?

yah, pretty much - if you want to connect to a server using ssh, then this
is the way to go...

> The scenario is I'm running a php script but I want to switch linix
> users?
> 
> Do I have to use ssh2?  I would have to go off the server and come back
> in just to switch users?

While I'm sure there's a better solution for what you're trying to do, since
we went down the ssh route - why not just reconnect back to the server using
SSH/SFTP and then you'll have the rights of the new user and can place the
file as that user?  You can use streams to push whatever you want over the
loopback'd ssh tunnel you just created.

Crazy yes, better way, probably.

H






More information about the talk mailing list