Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I wish to control my computer (and usb devices attached to the computer) at home with any computer that is connected to the internet. The computer at home must have a program installed that receives commands from any other computer that is connected to the internet. I thought it would be best if I do this with a web interface as it would not be necessary to install software on that computer. For obvious reasons it would require log in details.

So basically the problem is sending encrypted commands from a web interface to my computer at home. What would be the best method to achieve this and what programming languages should I use? I know Java, Python and C quite well, but have very little experience with web applications, such as Javascript and PHP.

I have looked at web chat examples as it is sort of similar concept to what I wish to achieve, except the text can be replaced with commands. Is this a viable solution or are there better alternatives?

Thank you

share|improve this question

1 Answer 1

up vote 1 down vote accepted

If you're asking about programming your own solution you should ask on StackOverflow (if you confirm this is the case, people will migrate the question automatically).

If you're talking about doing this as a general "control my computer" thing, you can install VNC to remotely log into your computer and do everything remotely as if you were sitting at the console. This would require you forwarding a port from your firewall/router to your computer, and if you want it encrypted, finding a way to either use a SSH tunnel or purchasing a version of VNC that uses encryption and is compatible with your version of Windows, or using a VPN tunnel between your workstation on the Internet to your home network.

VNC wouldn't necessarily require software installation on the client system you're on since there is a java web version that will display your computer's (home) desktop in a web browser.

Depending on what exactly you're trying to do, and what platform you have available, it may not be all that difficult to use some form of email to send commands to your home computer, if it's set up to retrieve email periodically and you could have it parse messages for a keyword or phrase that will trigger a subroutine for carrying out commands. It depends on how flexible you need the system to be and how complicated you want to get; from your description I don't know if you're trying to do something with home security or if you're just trying to shoot your cat with USB-connected NERF missiles from ThinkGeek.

share|improve this answer
    
Thank you very much. The main part of the project is actually a device that I will develop that connects to the computer's usb port. Sorry if it was a bit vague in my original question. This device will perform simple functions such as turning lights on etc. At first I will just attempt to switch the lights remotely using the internet. Later on I will add commands that can control certain aspects of the computer such as the music player. I think doing a full remote desktop connection to control my device is therefore not quite necessary. –  user58183 Oct 25 '10 at 13:35
    
If it has a set series of mini-commands, I'd probably look at a way of using a series of quick commands that are evaluated by scripts of some sort. If you're proficient in programming you could probably make a static binary that you could run and use as a control program; encryption could be done on the client and reversed on the server with a small interception program. Depends on how you're planning to do everything, but that would be relatively simple and you might not have to worry about maintaining the website side of the project. But that's just me. –  Bart Silverstrim Oct 25 '10 at 13:42
    
Yes, it will have a series of mini commands, but I'm not exactly sure what you mean. Do you suggest I have a small program running on my home computer that receives these commands and relays it to the usb port? And then a web app that sends the commands? What method should I use to send data between the two components? Can SSH be used for that or are there simpler/better methods? Eventually I wish to replace the computer with a single device that connects to the internet and can control many electronic devices in my house. –  user58183 Oct 25 '10 at 14:04
    
I was suggesting forgetting the web interface and have a small special-purpose server that receives a string of encrypted text, decrypts it, and relays the commands to your device(s). You can create a static client that takes your commands and encrypts them to send to the server, static so they you can carry it on a USB drive and not install it. It should simplify things as you just maintain your software and not have to maintain your software plus framework or third-party libraries on your final version of the software. –  Bart Silverstrim Oct 25 '10 at 14:13
    
I would think you could find a library that will encrypt the command(s) and send them to the server (with a status sent back, I suppose, using the reverse) so the only thing between the two systems are encrypted strings, no tunneling or additional protocols (like https) necessary. –  Bart Silverstrim Oct 25 '10 at 14:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.