shurix Posted November 14, 2009 Report Share Posted November 14, 2009 Labvakar. Esmu saskāries ar lietu ko vēl nekad neesmu veidojis. Ir nepieciešams no mana servera kur ir php5 ielogoties citā serverī caur ssh, lejuplādēt visu mapes saturu un pēc tam mapi iztīrīt tukšu. Ar php tas vispar ir iespējams? Būšu pateicīgs par jebkādu info. Paldies. Quote Link to comment Share on other sites More sharing options...
Klez Posted November 14, 2009 Report Share Posted November 14, 2009 (edited) ftp neder? /usr/bin/sftp -b /var/sftp_batch root@server.lv /var/sftp_batch saturs: get /celsh/uz/mapi/remote/serverii/*.* /cels/uz/kurieni/lokaalajaa_serverii/ lai izdzeestu: ssh root@server.lv "rm -rf /celsh/uz/mapi/remote/serverii/*.*" P.S autorizaacija remote serverii notiek ar sertifikātiem. ar php būs: exec('/usr/bin/sftp -b /var/sftp_batch root@server.lv'); exec('ssh root@server.lv "rm -rf /celsh/uz/mapi/remote/serverii/*.*"'); Edited November 14, 2009 by Klez Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.