[arm-allstar] Configuration file editor question

Doug Crompton wa3dsp at gmail.com
Thu Mar 23 00:36:10 EST 2017


Robert,

 Possible yes but not a good idea security wise. Some things just should be
under tighter wraps than an insecure web page. In my opinion editing of
rather sensitive files should be done through ssh not on the web. When you
open up file permissions it exposes the system to all kinds of exploits.

For now I think we should enjoy some of the other features Supermon brings
and not concentrate on editing files at least not most of them in Supermon.

But here is a neat way to do it. If you are on the web you can open an ssh
session to putty or any application from  the browser as long as you
program it correctly. Here is an example. I will put this in the Supermon
howto.

Create this script - call it moz-ssh.sh  - this script must reside on the
system where your browser runs (NOT on your Pi Allstar server) and be in
the search path. I use Linux and Firefox for all my computing so if you use
windows it will probably still work but will have to be done a different
way. Cut and paste this if you can as it is easy to type it wrong.

#!/bin/bash
#
# Called by Firefox Browser
# Interprets command sequence as beginning with a - (dash)
# Example - ssh://-load Pi3 -l root
command=`echo $1 | sed 's/%20/ /g' | sed 's/^[^-]*-/-/'`
putty $command

Make it executable -  chmod 755 moz-ssh.sh

Enter putty and save all the sessions you want to open. You can save IP
address, port, translation, font, etc. Test them by directly opening.

So lets say you have saved a session called Pi3

Now open a browser tab in Firefox and type in:

ssh://-load Pi3 -l root

The first time you do this you need to tell firefox where the file is and
check to do it every time. Point it to the moz-ssh.sh file

This should directly open a putty ssh session on your computer to the
server you defined. All you need to do is enter the password.

OK now the real beauty of this. In Supermon you can define URL's in the
allmon.ini file that appear in the top menu. Just define URL's to ssh to
your various systems.

[SSH-4000]
url="ssh://-load node40000 -l root"

So if you had a "node40000" name defined in putty with all the right
parameters it would connect and ask you for the password of course in a
window on your desktop NOT in the browser.

One click of the mouse and enter password - go to shell from ADMIN menu '9
enter' -  nano path/filename - and you are editing anything you want.

This is a much more secure way of doing it and of course if the computer
was outside your LAN at a distant location you would use the domain name or
public IP for it as the address. Always use passwords that are secure. NOT
you call! Use upper/lower alpha, numerics, and special characters and at
least 8-10 characters long. You can also set putty or ssh to auto login
using a key and avoid entering the password.

If you are using a Linux system to browse with Firefox this should work. I
have not tested in in any other scenario. If anyone finds a way to use it
on other OS's/browsers let me know.





*73 Doug*

*WA3DSP*

*http://www.crompton.com/hamradio <http://www.crompton.com/hamradio>*

On Wed, Mar 22, 2017 at 10:54 PM, "Robert Conklin via arm-allstar" <
arm-allstar at hamvoip.org> wrote:

> Would it be possible to link crontab -e or crontab -l in the file editor?
> --
> Robert Conklin
> *N4WGY <http://qrz.com/db/N4WGY>*
> _______________________________________________
>
> arm-allstar mailing list
> arm-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>
> Visit the BBB and RPi2/3 web page - http://hamvoip.org
>
>


More information about the arm-allstar mailing list