How can I share files over internet between Windows 7 and Linux?

5

2

I want to continuously write small media files (150-200 kb) from a windows 7 desktop machine behind a home LAN to a Debian Linux server in a data center over the internet. The system will remain in operation for many months at a stretch. How can I do this?

ashishlal

Posted 2013-12-02T17:12:28.310

Reputation: 81

Question was closed 2013-12-03T02:02:32.153

if this gets closed then ask in chat but you need rep to do that unfortunately. It's an intelligent question, you deserve rep. Make a comment then people can upvote that at least. In the meantime better to ask in another forum. Over here they'll take your very good intelligent question and say it is argumentative or not constructive or some incredibly dumb criticism as the reason for closing, but what it boils down to is they don't like somewhat opinion based questions on superuser. – barlop – 2013-12-02T17:20:57.093

1Which forum would you recommend? – ashishlal – 2013-12-02T17:22:36.977

arstechnica forum is often quite good – barlop – 2013-12-02T17:22:51.243

2@barlop - You don't get reputation from people voting on a comment. This question has a great deal to be desired, for instance, specific operating systems in use. – Ramhound – 2013-12-02T17:29:00.653

2But what your concerns are? All methods will let you successfully accomplish copying files. There should be something that makes you to prefer one or another. If there are no such concerns I personally would prefer scp since it requires less configuration. – VL-80 – 2013-12-02T18:00:02.980

Since the commentary on the "on hold" message says "If this question can be reworded to fit the rules in the help center, please edit the question or leave a comment." If this is really an "if", then perhaps those that put it on hold with that message, could reword it? – barlop – 2013-12-03T19:31:24.890

This is not a forum. Questions must be specific and answerable. Discussions belong on forums or in the [chat].

– Kevin Panko – 2013-12-03T19:59:48.060

1@KevinPanko I didn't say otherwise, but since the message that appeared when it was put on hold says "If this question can be reworded to fit the rules in the help center, please edit the question or leave a comment" <-- see what that says. So either it can or it can't. If it can then perhaps you can reword it? If it can't then what is the point of it saying "If"? (and notice also from his rep (23 as of writing and was even less before, as he is new, that he can't get into chat) – barlop – 2013-12-03T20:06:14.667

Well, you already reworded it, and I voted to reopen the question. It has 2 out of the required 5 votes right now. But it would be even better if the question did not ask "How can I do X" and was "How can X be done?" The best questions are able to help not just one person, but many people with the same kind of problem. – Kevin Panko – 2013-12-03T20:12:34.430

Answers

0

Another option which may be simpler might be using win-sshfs or equivalent. This allows you to use ssh to mount a remote filesystem like SMB, so its easy to read/write in real-time, provides security as per a VPN, and immediacy and simplicity not available on SCP

davidgo

Posted 2013-12-02T17:12:28.310

Reputation: 49 152

I have been using win-sshfs. It does the job of copying but is really slow. Is there a faster alternative? – ashishlal – 2013-12-08T12:58:27.290

0

Opinions aside, let's look at the options you gave:

1) SMB

This may work with desired results, but SMB is not a good option for WAN-based destinations because of security risks (exposing your destination server to the Internet, for example). Otherwise, it is a good option with proper security precautions (firewall rules, etc).

2) VPN

A VPN alone won't do the trick. You'd need to use some other technology on top of it, such as SMB, NFS, or any other method. Also, depending on connection quality interruptions could affect your application.

3) SCP

SCP is a file transfer protocol using SSH and is similar (but as comments pointed out, not the same as) SFTP. This is a very secure protocol and will work well for your needs, with the side effect of overhead since you'd be transferring files in batches rather than continuously (or running scp x times a minute, for example).

Between the 3, SMB is the easiest to just get working providing you do it properly and if you're familar with how to configure samba properly.

Nathan C

Posted 2013-12-02T17:12:28.310

Reputation: 2 522

1

You mean WAN, right? SMB, in this case, is not easier, you need to run and know samba, which is not even easy. FTP over SSH is SFTP not SCP, it's another option! Also there is FTPS. Define continuously.

– week – 2013-12-02T18:11:52.840

continuously means one video chunk is generated every 10 seconds and has to be sent over to the server. A commercial Samba like solution which works over the WAN might do. In that case the video packet is generated directly in the server directory. – ashishlal – 2013-12-02T18:19:08.663

@week What you pointed out is true yes, but they use the same types of encryption. samba is not extremely user-friendly, but anyone familiar enough with *nix and a guide handy can get it working in a matter of minutes. – Nathan C – 2013-12-02T19:05:23.417

@NathanC would you like to change "SCP is essentially FTP-Over-SSH, or SFTP" <-- Which is completely confusing and misleading as "week" pointed out well, to something like(and I hope this is right?) "SCP is a file transfer protocol included in the SSH suite, not the same protocol as FTPS(FTP over SSH) or SFTP(FTP over SSL), though SCP performs the same function of file transfer" Then hopefully your answer will be clear of errors. And perhaps a good answer, and i'd upvote it when it is free of those problems 'week' pointed out. – barlop – 2013-12-02T19:19:16.087

@barlop I fixed it. – Nathan C – 2013-12-02T19:45:31.467

+1 ok, will see if anybody can spot any other errors or improvements! – barlop – 2013-12-02T20:32:16.383

0

You have several options, as you realize.

Things based on SSH will be easiest - SSH takes care of security provided your passwords are strong enough or you use keyfiles - and SSH can "automatically" do file transfers via scp or sftp. So you have security and a file transfer method rolled up into one. You can also use WinSCP to manually log into the Debian server and manage files if needed for any reason.

  • Dokan lets you mount an SSH server as a Windows drive.

  • You could install Cygwin on your Windows system and use Cygwin's scp to copy files via SSH to your Debian Linux box. I'm sure with enough searchng you could find a standalone command-line scp that doesn't need Cygwin installed.

VPN solutions, such as OpenVPN, will give you a secure connection between your server and your Windows system. But you will still need to do something about actually transporting the data. You could, once you have OpenVPN set up on both ends, install and configure samba on the Linux side and then map the Linux box over the VPN as a drive on Windows. It will be slow and a bit unstable depending on your Internet connection. And a lot more work than just doing something with SSH.

If the Windows box will only ever need to "upload" to the Debian box, you could set up a web server on the Debian box, secure it with SSL, and use an HTTP(S) uploading tool to transfer the files. Unless you have a webserver on this system already it's easier just to leverage SSH.

There's also many more esoteric methods which are all are still more work than SSH + Dokan or scp above and not more secure or easier to use.

LawrenceC

Posted 2013-12-02T17:12:28.310

Reputation: 63 487

Thanks. Dokan seems like something I was looking for. Let me try it out. Also, are there any other similar open source or commercial solutions I can look at? – ashishlal – 2013-12-02T19:32:43.250

Hmm. DokanSSHFS crashes when I connect to the server. Its more than 2 years old. Have you used it? Does it use any ports other than 22? – ashishlal – 2013-12-02T19:54:12.557

It has been awhile since I've used it. I remember some sort of configuration utility that was used to configure the drive and you could specify a server:port combination there. I may need to play with it again sometime. – LawrenceC – 2013-12-03T15:15:05.013

I have been using win-sshfs. It does the job of copying but is really slow. Is there a faster alternative? – ashishlal – 2013-12-08T12:57:43.257