Re: Control of OpenBSD through a web interface
Without the need of a web interface, if your goal is to automate some boring tasks, you can have a look at Fabric (http://fabfile.org). I use it with a lot of servers everyday and it's very easy to script whatever you want. Morgan Le 15/06/2011 20:36, Jean-Frangois SIMON a icrit : Hi, I have a remote controlled machine which I manage by ssh and yet I'm in the process of making up a small web page through which basic commands can be passed. I have no clear idea regarding how to design this, in the first place I thought about a cgi script written in C which I did manage to have it say hello world at the present time, but not yet much more. There's not yet clear clues regarding how to make this peace of web interface talk to the system and I would like to make it clean by means of elegant way to deal with web page- system communication. Any clue regarding the way it could be ? Thanks, Jean-Frangois
Re: Control of OpenBSD through a web interface
On Wed, 15 Jun 2011, [ISO-8859-1] Jean-Frangois SIMON wrote: Hi, I have a remote controlled machine which I manage by ssh and yet I'm in the process of making up a small web page through which basic commands can be passed. I have no clear idea regarding how to design this, in the first place I thought about a cgi script written in C which I did manage to have it say hello world at the present time, but not yet much more. There's not yet clear clues regarding how to make this peace of web interface talk to the system and I would like to make it clean by means of elegant way to deal with web page - system communication. Any clue regarding the way it could be ? Thanks, Jean-Frangois If you really need a web-GUI, Why not use webmin? Lee
Re: Control of OpenBSD through a web interface
On 06/15/11 12:36, Jean-Frangois SIMON wrote: Hi, I have a remote controlled machine which I manage by ssh and yet I'm in the process of making up a small web page through which basic commands can be passed. I have no clear idea regarding how to design this, in the first place I thought about a cgi script written in C which I did manage to have it say hello world at the present time, but not yet much more. There's not yet clear clues regarding how to make this peace of web interface talk to the system and I would like to make it clean by means of elegant way to deal with web page- system communication. Any clue regarding the way it could be ? Thanks, Jean-Frangois !DSPAM:4df8fc6181751664719687! I did this for a server in a law office to allow the users to do things like kill runaway print jobs and to restart the server. httpd was *not* accessible from the internet by a rule in pf and was run as httpd -u (un-chrooted). You can write CGIs as shell scripts--you just have to send the correct headers at the beginning of the script. Use your google-fu to figure those headers out. If the jobs you need require more than simple shell scripts, you can use php or perl. In the un-chrooted environment they will give you access to *everything*. Hope that helps! Jeff
Re: Control of OpenBSD through a web interface
On 06/15/11 14:36, Jean-Frangois SIMON wrote: Hi, I have a remote controlled machine which I manage by ssh and yet I'm in the process of making up a small web page through which basic commands can be passed. I have no clear idea regarding how to design this, in the first place I thought about a cgi script written in C which I did manage to have it say hello world at the present time, but not yet much more. There's not yet clear clues regarding how to make this peace of web interface talk to the system and I would like to make it clean by means of elegant way to deal with web page- system communication. Any clue regarding the way it could be ? Thanks, Jean-Frangois Please don't take this the wrong way--I am not trying to be snarky, but you should not attempt this on your own. You're creating a great new attack surface which can really hurt you. GUI tools for anything (myphpadmin, etc) don't exactly have a good history of security, at least not for a long time. You CAN teach non-technical users to use a command line. I have done this, including normal people how to use the teco editor. --STeve Andre'
Re: Control of OpenBSD through a web interface
If you must do it just use webmin (make sure you have SSLeay installed). If this is more of a technical exercise for yourself. Pick up the CGI Programming in C and PERL book by Thomas Bhoutell. It's old but it was one of my faves once upon a time. -Bryan 2011/6/15 Jean-Frangois SIMON jfsimon1...@gmail.com: Hi, I have a remote controlled machine which I manage by ssh and yet I'm in the process of making up a small web page through which basic commands can be passed. I have no clear idea regarding how to design this, in the first place I thought about a cgi script written in C which I did manage to have it say hello world at the present time, but not yet much more. There's not yet clear clues regarding how to make this peace of web interface talk to the system and I would like to make it clean by means of elegant way to deal with web page - system communication. Any clue regarding the way it could be ? Thanks, Jean-Frangois
Re: Control of OpenBSD through a web interface
There are free solutions available for web-based SSH; cf. here: http://en.wikipedia.org/wiki/Web-based_SSH The way you might want to set this up is so that you might install your own chosen web-based SSH software on the same OpenBSD box that also is the one you want to access via web-based SSH. (So the actual SSH traffic then becomes traffic to localhost.) Be aware that whatever box the web-based SSH software runs on can potentially see and intercept the SSH traffic in clear text, so you want to be in control of that box. Also, be VERY aware that this -*at best*- reduces the security offered by SSH to that offered by HTTPS. (Wasn't there some news some time back that HTTPS had been defeated in some context? Does anyone remember?) Whether you are prepared to sacrifice this much security for convenience obviously is for you to decide. That said, if you do implement something like this, I'd be interested in reading your notes about exactly how and you did things. Yeah, I'm a curious feller. --regards, ropers 2011/6/15 Jean-Frangois SIMON jfsimon1...@gmail.com: Hi, I have a remote controlled machine which I manage by ssh and yet I'm in the process of making up a small web page through which basic commands can be passed. I have no clear idea regarding how to design this, in the first place I thought about a cgi script written in C which I did manage to have it say hello world at the present time, but not yet much more. There's not yet clear clues regarding how to make this peace of web interface talk to the system and I would like to make it clean by means of elegant way to deal with web page - system communication. Any clue regarding the way it could be ? Thanks, Jean-Frangois
Re: Control of OpenBSD through a web interface
Thank u for this :D I'm just trying out Fabric and it seems very good! Mike On Wed, Jun 15, 2011 at 10:15 PM, Comhte com...@daknet.org wrote: Without the need of a web interface, if your goal is to automate some boring tasks, you can have a look at Fabric (http://fabfile.org). I use it with a lot of servers everyday and it's very easy to script whatever you want. Morgan Le 15/06/2011 20:36, Jean-Frangois SIMON a icrit : Hi, I have a remote controlled machine which I manage by ssh and yet I'm in the process of making up a small web page through which basic commands can be passed. I have no clear idea regarding how to design this, in the first place I thought about a cgi script written in C which I did manage to have it say hello world at the present time, but not yet much more. There's not yet clear clues regarding how to make this peace of web interface talk to the system and I would like to make it clean by means of elegant way to deal with web page- system communication. Any clue regarding the way it could be ? Thanks, Jean-Frangois