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?
-
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 Dec 02 '13 at 17:20
-
1Which forum would you recommend? – ashishlal Dec 02 '13 at 17:22
-
arstechnica forum is often quite good – barlop Dec 02 '13 at 17:22
-
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 Dec 02 '13 at 17:29
-
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 Dec 02 '13 at 18:00
-
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 Dec 03 '13 at 19:31
-
This is [not a forum](http://meta.stackexchange.com/questions/92107/is-stack-overflow-a-forum/92110#92110). Questions must be specific and answerable. Discussions belong on forums or in the [chat]. – Kevin Panko Dec 03 '13 at 19:59
-
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 Dec 03 '13 at 20:06
-
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 Dec 03 '13 at 20:12
3 Answers
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.
- 2,692
- 1
- 16
- 25
-
1You 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](http://superuser.com/questions/134901/whats-the-difference-between-scp-and-sftp) SCP, it's another option! Also there is FTPS. Define `continuously`. – week Dec 02 '13 at 18:11
-
`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 Dec 02 '13 at 18:19
-
@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 Dec 02 '13 at 19:05
-
@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 Dec 02 '13 at 19:19
-
-
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
- 68,623
- 13
- 106
- 163
-
I have been using win-sshfs. It does the job of copying but is really slow. Is there a faster alternative? – ashishlal Dec 08 '13 at 12:58
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
scpto copy files via SSH to your Debian Linux box. I'm sure with enough searchng you could find a standalone command-linescpthat 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.
- 73,030
- 15
- 129
- 214
-
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 Dec 02 '13 at 19:32
-
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 Dec 02 '13 at 19:54
-
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 Dec 03 '13 at 15:15
-
I have been using win-sshfs. It does the job of copying but is really slow. Is there a faster alternative? – ashishlal Dec 08 '13 at 12:57