3

I have a localhost port forwarded SSH tunnel between an Azure Linux VM and Localhost PC using PUTTY. So when I localhost:8080 on my windows PC, I see my static website hosted on the AzureVM.

I need to upload some remote files to this website. At the moment when I click the file upload on the localhost website, it searches for files on my local windows pc.

Is there any way I could make it look for files on another server(Or the same azure VM) or maybe Azure Blob storage?

Thanks!

Nikz
  • 71
  • 6

1 Answers1

1

Ok to upload through putty is a tedious process as you need code running on the linux machine to do it .

We generally use putty to control the AWS machine and run commands directly on it and use another FTP program like File Zilla , WinSPC or somthing similar for uploading

To upload a program directly with putty you have to write the protocol yourself or use a putty add-ons but its a pain to work with .

here some choices

https://helpdeskgeek.com/free-tools-review/the-best-ftp-tools-to-transfer-files-to-your-website-domain/

If you really want to go through the headaches of using putty to transfer files use this link as a start https://www.hostknox.com/tutorials/ssh/putty/file-transfer

JonoJames
  • 1,117
  • 8
  • 22
  • Thanks for the reply. The putty part was just for context. What I wanted to know was if I can edit the HTML to browse for files on a remote server or location such as Azureblob, instead of it looking for files on my local windows pc. – Nikz Jul 06 '22 at 05:07
  • Yea Ive done that on PHP server I listed AWS by setting some settings in the config files to show directory listing . so if there is no htacces file or index.html should show the files in the browser window if you want to see the files that you uploaded just hit "ls" For Remote files you have to download them on your PC first before uploading – JonoJames Jul 06 '22 at 05:13
  • Try this ... https://stackoverflow.com/questions/6217055/how-can-i-copy-a-file-from-a-remote-server-to-using-putty-in-windows Just replace the Directory url with your server URL – JonoJames Jul 06 '22 at 05:21
  • Thanks again for checking into this. Unfortunately, I cannot copy files to the windows PC because of security restrictions. The system needs to be designed such that the file sitting on a secure remote server should not be moved from there. So, can I make the html file upload button somehow point to a remote location to browse files from there? – Nikz Jul 06 '22 at 05:33
  • You would have to configure on the remote server to accept connections from the primary server . you can do that setting up an SSL server on the remote server . You primary server becomes the SSL client and you can do it with c++ code running a cron job to check the dir and if anything is there push it through the SSL pipe – JonoJames Jul 06 '22 at 05:45
  • To install SSL on the remote server https://zoomadmin.com/HowToInstall/UbuntuPackage/ssl-cert – JonoJames Jul 06 '22 at 05:49
  • Here is what you looking for https://askubuntu.com/questions/1393416/how-can-i-perform-a-secure-automatic-file-transfer-between-two-servers – JonoJames Jul 06 '22 at 05:53