LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 05-06-2012, 03:16 AM   #1
amit_1
LQ Newbie
 
Registered: Mar 2012
Posts: 25

Rep: Reputation: Disabled
How to display Linux shell in a web page?


I have a website hosted on Apache server on my Red Hat machine. I want the users of the website to access the Red Hat's Shell using that website. I want the users to use to all the shell commands through the website.
How can I do that?
Any help would be greatly appreciated!
 
Old 05-06-2012, 03:27 AM   #2
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,007

Rep: Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003
there is a firessh extension to firefox. Is this what you are looking for?
 
Old 05-06-2012, 04:53 AM   #3
amit_1
LQ Newbie
 
Registered: Mar 2012
Posts: 25

Original Poster
Rep: Reputation: Disabled
No, I need a solution which is not browser specific.
 
Old 05-06-2012, 05:00 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,539
Blog Entries: 51

Rep: Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604
Quote:
Originally Posted by amit_1 View Post
I have a website hosted on Apache server on my Red Hat machine.
If that is that the same remote machine running RHEL 5.6 you mentioned here then you should first know that this machine is already behind the times. Current is RHEL 5u8.


Quote:
Originally Posted by amit_1 View Post
I want the users of the website to access the Red Hat's Shell using that website.
Why would you want to do that?
How will you ensure the server can not be (ab)used for malicious activity?
Please explain and be verbose.


Quote:
Originally Posted by amit_1 View Post
I want the users to use to all the shell commands through the website.
You want to give any anonymous user of the web site access to all shell commands?
Do you have any idea what trouble you are in for?

Until you have explained what you want to do and how you will secure the server I suggest you
ignore replies that blithely give you solutions without questioning.
 
Old 05-06-2012, 05:23 AM   #5
gardar
LQ Newbie
 
Registered: Apr 2005
Location: Reykjavik, Iceland
Distribution: ArchLinux, Debian, CentOs, RHEL, Ubuntu
Posts: 22

Rep: Reputation: 2
You could use Ajaxterm http://antony.lesuisse.org/software/ajaxterm/

But I advice you to secure everything very well first
 
Old 05-06-2012, 07:19 AM   #6
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
hi amit_1 ,

it could be shell_exec you're looking for ?
But you need to secure (https at least) all the execution to that website.
 
Old 05-06-2012, 07:30 AM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,539
Blog Entries: 51

Rep: Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604
Quote:
Originally Posted by lithos View Post
you need to secure (https at least) all the execution to that website.
Could you please explain how using HTTPS negates security issues caused by the OP allowing all users to execute all commands on his server?
 
Old 05-06-2012, 07:55 AM   #8
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,007

Rep: Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003
that will go thru by a given user id I think and this user will have a restricted shell: http://linux1.ca/downloads/restricted_env.txt. https will protect only the line.
 
Old 05-06-2012, 09:46 AM   #9
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Quote:
Originally Posted by unSpawn View Post
Could you please explain how using HTTPS negates security issues caused by the OP allowing all users to execute all commands on his server?
No, I didn't mean to negate or anything like that just pointing in some of the security measurements to take.
Of course there is a lot more need to do,

so please

Quote:
Originally Posted by unSpawn View Post
ignore replies that blithely give you solutions without questioning.

Thank you
 
Old 05-06-2012, 10:23 AM   #10
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,539
Blog Entries: 51

Rep: Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604
The OP's past actions should spell "has just enough knowledge to be dangerous" to any of you.
Not asking what the OP really wants to do, replying without knowing it and none of you wondering about the security implications until my cue.
That's worrying.

Now let's see what the OP has to say for himself.
 
Old 05-06-2012, 11:00 AM   #11
amit_1
LQ Newbie
 
Registered: Mar 2012
Posts: 25

Original Poster
Rep: Reputation: Disabled
Smile

Quote:
Originally Posted by unSpawn View Post
If that is that the same remote machine running RHEL 5.6 you mentioned here then you should first know that this machine is already behind the times. Current is RHEL 5u8.
Yes, this is the same machine There are newer versions of RHEL available, but for time being i will be using the same version. May be in future i will move to newer version.


Quote:
Originally Posted by unSpawn View Post
You want to give any anonymous user of the web site access to all shell commands?
Do you have any idea what trouble you are in for?

Until you have explained what you want to do and how you will secure the server I suggest you
ignore replies that blithely give you solutions without questioning.
The website is going to be password protected. So, only authorized users will have access to the website.

Also the website is hosted on a server which is a part of a Local Area Network and so, it cannot be accessed over internet.


Users have an option to access RHEL 5.6 system using SSH but i want to give them an alternative to access the system through a web-based Shell.

This is why i want to display linux shell on my webpage...
 
Old 05-06-2012, 04:17 PM   #12
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,539
Blog Entries: 51

Rep: Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604
Quote:
Originally Posted by amit_1 View Post
The website is going to be password protected. So, only authorized users will have access to the website. Also the website is hosted on a server which is a part of a Local Area Network and so, it cannot be accessed over internet.
Password protection itself mean nothing as we don't know what basis you authorize users on. LAN limits access better but a server not being accessible from the Internet doesn't necessarily mean users can't download stuff. Regardless of all of that you best not give any users access to potentially dangerous commands or allow them Sudo access. (My shell suggestion would be shellinabox BTW.)
 
Old 05-07-2012, 07:04 AM   #13
amit_1
LQ Newbie
 
Registered: Mar 2012
Posts: 25

Original Poster
Rep: Reputation: Disabled
Thanks unSpawn. Yes, I will make sure not to allow sudo/root access.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for something that will display stats on a web page Skillz Linux - Software 2 11-04-2010 09:01 AM
Why does my Ubuntu Linux program only display approximately 25% of a web page? cebutom Ubuntu 2 04-21-2010 06:19 AM
executing linux commands from web page and outputing it back to the web page ashes_sheldon Programming 8 05-09-2009 06:19 AM
Time display wrong in web page glowe Linux - Server 3 03-17-2007 10:18 AM
How do I display real shell script output to web page. farmerjoe Programming 1 04-07-2005 01:03 PM


All times are GMT -5. The time now is 03:24 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration