5

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?

9
  • 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 2, 2013 at 17:20
  • 1
    Which forum would you recommend?
    – ashishlal
    Dec 2, 2013 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 2, 2013 at 17:29
  • 2
    But 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 2, 2013 at 18:00
  • 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 3, 2013 at 20:06

3 Answers 3

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

1
  • I have been using win-sshfs. It does the job of copying but is really slow. Is there a faster alternative?
    – ashishlal
    Dec 8, 2013 at 12:58
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.

4
  • 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 2, 2013 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 2, 2013 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 3, 2013 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 8, 2013 at 12:57
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.

6
  • 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
    Dec 2, 2013 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 2, 2013 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 2, 2013 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 2, 2013 at 19:19
  • @barlop I fixed it.
    – Nathan C
    Dec 2, 2013 at 19:45

Not the answer you're looking for? Browse other questions tagged .