Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.