How do I connect to SFTP server with web browser?

1

3

I just created an SFTP file server using tutorial https://www.digitalocean.com/community/tutorials/how-to-enable-sftp-without-shell-access-on-ubuntu-16-04

Now I want to share the files to the third party so that they can download them using the username and password. The problem is that I don't know the URL for my FTP/SFTP site because I am very new to FTP.

I can see the URL on the FileZilla as sftp://dilipyadav@myhost.com. When I hit this URL on the browser, this doesn't open the FTP file directory.

What should be the URL that will point to my FTP file directory?

theone1one

Posted 2019-08-27T12:14:26.883

Reputation: 123

more than likely, the IP or name of your host will suffice. Is "myhost.com" a placeholder? – YetAnotherRandomUser – 2019-08-27T14:16:04.987

@YetAnotherRandomUser nope it's just an example host. – theone1one – 2019-08-27T18:15:34.227

if it's an example, then how is it not a placeholder? Try using the actual value (name or IP) to connect to the FTP server with something like FileZilla and see what happens. – YetAnotherRandomUser – 2019-08-27T18:19:55.077

@YetAnotherRandomUser OP can connect with FileZilla. I do not see where you are heading. – Martin Prikryl – 2019-08-28T06:17:25.133

I was implying that the OP should try try connecting to the FTP server with filezilla from another machine using the actual information that he just pointed out; whatever is in place of "myhost.com". FileZilla is my go-to client, so I'm more familiar with it than WinSCP, and often use it interchangeably with "FTP client", especially when teaching someone FTP. – YetAnotherRandomUser – 2019-08-28T13:46:58.680

@theone1one when you say what URL should you share, are you looking for a URL starting with "sftp://"? URLs can mean a lot of things in a lot of places, so I read that as you were looking for the hostname or IP to connect to. Usually for FTP/SFTP transfers, you don't use a URL. You would give a person an IP (192.168.1.53) or hostname (ftp.mysuperawesomesite.com), and then a username and password. – YetAnotherRandomUser – 2019-08-28T13:54:43.690

Answers

3

SFTP and FTP are two completely different and incompatible protocols. Do not mix those two.

No major web browser support SFTP (at least not without any addin).

The "third party" need to use a proper SFTP client.

Some SFTP clients can register to handle sftp:// URLs. You will then be able to paste SFTP file URL to a web browser and the browser will open the SFTP client to download the file.

For example WinSCP does register for handling of sftp:// URLs. (I'm the author of WinSCP)

FileZilla does not.

Martin Prikryl

Posted 2019-08-27T12:14:26.883

Reputation: 13 764

1Yes, we can not browse SFTP URL on the browser. The web browser only supports FTP. So I have set up an FTP server with username and password. I can now share the FTP URL to the third party. – theone1one – 2019-09-03T14:57:11.577