Hi first post here, so i hope im posting in the right area 🙂

I have many scripts that upload files to a webserver, when the script runs localy on that webserver, but as a part of my final year university project i want to allow the user to upload files to the university unix machines via ssh. Now this is usualy done via an SSH client, and i was wondering if it was atal possible to do this in a webpage?

Any advice would be greatly appreciated, thank you.

Alex

    im not sure i made it entirely clear what i was trying to achieve. When i say the university unix machines i dont mean to a webserver, i mean their actual user home directory accounts (if you dont understand think of me creating a webpage to upload files to your windows home directory in /mydocuments).

    Though thank you for the initial responce.

    Alex

      You would need your webserver configured to serve pages via SSL connection (I'm not real knowledgeable on what it takes to do that). Then you could have the user upload a file as they would with any other file upload. Once your form-handler script receives the file, you could then use the [man]FTP[/man] functions with the [man]ftp_ssl_connect()[/man] function to move the file wherever the user wants. (They would have to provide the ftp login info as part of the file upload.)

        NogDog wrote:

        You would need your webserver configured to serve pages via SSL connection
        (I'm not real knowledgeable on what it takes to do that).

        Then you could have the user upload a file
        as they would with any other file upload.

        Once your form-handler script receives the file,
        you could then use the [man]FTP[/man] functions with the [man]ftp_ssl_connect()[/man] function
        to move the file wherever the user wants.
        (They would have to provide the ftp login info as part of the file upload.)

        thanks Nogdog
        I was trying to give an answer, that was a good general guess.
        Because i know we can do most anything with Free PHP, as we can do with Commercial applications, for example.

        You did clarify, NogDog, based on your vast and long time experience of PHP issues,
        what it can probably take to do SSH (secure shell) Upload with PHP.

        thanks again,
        your halojoy

          thanks alot guys that gives me a good starting point, ill look into ftp_ssl_connect() function thank you 🙂

            Write a Reply...