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 have a serial modem connected to a computer running ubuntu. I can access it through ssh and modem is working great, I tested it using minicom.

How can I make a remote connection to this modem for development purposes?. By the way, my development computer is running a MacOS X 10.6.4 and my intention is to test my java classes without having to redeploy with each test.

share|improve this question
    
You mean that you want to dial from a modem to another modem like in the old times? –  LatinSuD Sep 24 '10 at 22:24
    
No, I just want to see the input and output from the modem to my development computer and make that my java class, read and write the data. –  user55238 Sep 25 '10 at 6:36
add comment

2 Answers 2

up vote 0 down vote accepted

Instead of exposing the modem to the internet. What you need to do is to sent all commands you want to execute thru ssh.

You can do:

ssh -t USER@SERVER 'sudo minicom'

the t option is required since minicom is a screen-based program.


Developing in Java

If you are doing a java development what I would do instead on caling "Runtime.getRuntime().exec("COMMAND")".
Have a class that understand when is running on the developer machine or the actual computer. That way you can call that class with the command that you want to execute. When the projects runs on the developer you can 'encapsulate' the execution with an ssh program like.

Runtime.getRuntime().exec(ssh USER@SERVER 'COMMAND')


Considerations about remotly executing commands without password

  • Do an ssh connection relaying on a public/private key authentication. That way you dont need to enter the password manually on each command sent.

  • Since you are using Ubuntu, if you need to run commands with the sudo modifier have the user you use to connect ssh in /etc/sudoers declared as so: USER ALL= NOPASSWD:ALL

share|improve this answer
add comment

If your Ubuntu is running GNOME, then you can set it up for "Remote Desktop" (a.k.a. VNC server) access and then access it remotely via "Remote Desktop Viewer" (a.k.a. VNC client).

share|improve this answer
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.