Ronster's avatar

php7 ssh2 alternative?

Hello,

I need to upload a file to a remote SFTP server but can't get it to work.

I'm on Heroku with php7 installed so the ssh2 method are not available. The encrytption is based on a DSA private key and passphrase so phpseclib is not an option.

Does anybody has any idea for an alternative way to connect and upload.

thanks!

0 likes
6 replies
Ronster's avatar

Flysystem is also on phpseclib which doesn't support DSA keys.

How would an exec command look like?

thnks

ohffs's avatar

Exec just runs a shell command - so you just type what you would if you were doing it manually (eg, scp /my/file.log [email protected]:/dump).

Ronster's avatar

ok, i'm not pretty familiar with shell commands.. hopyfully you can help me with this.

I need to authenticate with a private DSA key and passphrase. How would that fit in the command above?

thanks

ohffs's avatar

I need to go to a meeting just now (yay...) - but if you google around you should find some examples :-)

Ronster's avatar

Ok,

I have this at the moment scp -i ' . storage_path( 'app/keys/puttyprivate.ppk' ) . ' -P 22 ' .storage_path( 'app/sdd/file.xml' ) . ' user@host/uploads

but still get the "Host key verification failed." error.

I can't seem to find how to load the passphrase with the scp command.

any ideas?

Please or to participate in this conversation.