LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-13-2004, 01:14 AM   #1
tpfraz
LQ Newbie
 
Registered: Dec 2003
Posts: 2

Rep: Reputation: 0
running commands automatically via SSH


Hello.
I'm trying to figure how to do something that I think is possible.
I have many users on a server that I would like to give access to one
particular script. However most of them don't know how to use SSH or Linux and I would rather not have to teach them all.
So, what I want to do is setup some kind of SSH client for them that they can simply run. But instead of logging into the Linux box and giving them a command prompt, it just logs in, runs the command, and exits. All while being fairly transparent to the user. Of course the user would at some point have to enter a username and password.
Also, if possible, it would be nice to be able to integrate this into a web page. I was looking at MindTerm for that, the Java applet.

Does anyone know of any way to do this? Or of any SSH clients (preferably free) that have these kind of configuration options?

Also, I don't have access to these users individual machines. So it would be best to have something that I could configure and then hand over to them. Which is another reason a web based client would be nice.

Any help is very much appreciated.

Thanks,
Travis
 
Old 02-13-2004, 09:12 AM   #2
Rounan
Member
 
Registered: Jun 2003
Location: Ontario
Distribution: Ubuntu, Gentoo, Debian
Posts: 416

Rep: Reputation: 30
I don't know anything about it, but I know that PHP is capable of this. Probably java too, or python, or any number of others.

It sounds like the best thing to do is set up a web page that the users can access, with some basic fields: user, password, and a "run my script" button. With this input, a web-based script like PHP can run the command as the user directly on the server, without the need fo a SSH connection or the like.
I used a program called Music Player Daemon (MPD) on an old box with apache, and I was able to control the daemon's playlist, volume, song controls, etc via a PHP-scripted web interface. That was pretty complicated - you can try examining that source if you like, but it's probably far more than you need.
Unfortunately, I don't know anything about PHP or any other web-based language, so I can tell you it can be done, but not how to do it!
I'm sure there have to be tutorials/articles in the Programming forum, or on our good friend Google.

Cheers,
--Rounan
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I automatically make a ssh key? cereal83 Linux - Security 11 09-20-2005 02:16 PM
Running commands over ssh iago Programming 8 11-28-2004 12:13 PM
cp and rm commands automatically overwrite m_yates Debian 2 04-04-2004 09:59 PM
Automatically running commands azebuski Linux - Newbie 3 02-11-2004 09:36 PM
automatically running commands... lhoff Linux - General 9 02-21-2002 02:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration