![]() |
[Announce] OpenSSH status widget
4 Attachment(s)
This OpenSSH status widget provides a GUI to control the OpenSSH daemon as well as wifi power management from the status menu in many useful ways:
The attached image shows the button when
A short tap on the main button starts the server and stops it without closing active connections. A long tap on the main button either shows a configurable dialog or disconnects and stops the server instantly. When tracking is disabled the number of connections can be called up additionally. A short tap on the wifi pm button keeps wifi pm off for 30 seconds. This solves login problems caused by wifi pm. A long tap on the wifi pm button opens wifi pm settings. Settings can be accessed from the dialog window or by opening "OSW Options" in the application menu, category desktop. OpenSSH Status Widget can be found in Extras-testing and Extras-devel. Download of the latest deb file is available from the package website. |
Re: [Announce] OpenSSH status widget
nice nice i had been playing with ssh lately this will help .
btw add announce to thread title or it looks like help thread |
Re: [Announce] OpenSSH status widget
Thanks for this - I was looking for such a tool for some time now.
Here ist the first feedback: When I click on the widget to stop the server, it notifies me "Could NOT stop OpenSSH server!". However, the widget then shows "off". I tried to manually kill sshd. The sshd process gets restarted instantly. How to solve this? And what also interests me: what is the command line instruction to count all ssh connections? |
Re: [Announce] OpenSSH status widget
Quote:
|
Re: [Announce] OpenSSH status widget
Quote:
Code:
#start on stopped rcS Quote:
Code:
ps aux | grep sshd: | grep -c @ I just uploaded v1.0-2 with corrected status detection when an error occurs. |
Re: [Announce] OpenSSH status widget
Thanks for the feedback and notes. I commented out the 2 lines and installed the new version. Now it works!
|
Re: [Announce] OpenSSH status widget
One more feedback in regards to this handy little tool:
If the sshd gets started from the command line, the widget show as status "off". It then also does not show the number of ssh connections. |
Re: [Announce] OpenSSH status widget
Quote:
At the moment when you start the server from command line for some reason you can make the widget start tracking just by pressing its button. The widget will recognize and display the server's real status and in addition give a respective note. I think about adding a configuration window with an autostart option and an optional confirmation dialog when closing active connections. So maybe an option to keep tracking when the server is off might also be added. |
Re: [Announce] OpenSSH status widget
A new version 1.1-2 is uploaded.
Main change is a new configuration dialog, see attached image in post #1. The default behaviour is now to keep tracking server status even when the server is off. This can be turned off if there's worry about battery drain. The configuration dialog has no "save" button, changes are saved instantly. But for the widget options to be applied in the current session the status menu has to be restarted. This can be done from the main menu. I also added detection of a conflicting server configuration in /etc/event.d/sshd. So i hope the widget is now ready to use in any case.:) Changes in v1.1-0: *added optional confirmation dialog when disconnecting *changed default configuration to keep tracking when off *added configuration window with 3 options: autostart, confirm when disconnecting, stop tracking when off *added system check for conflicting "respawn" option with optional correction Changes in v1.1-1: *typo bugfix Changes in v1.1-2: *small change: make sure /etc/event.d/sshd has correct 'start on' entry |
Re: [Announce] OpenSSH status widget
Thanks for this rasmarc! :) At the moment I'm using the 'SSH Status and Switcher' status-applet, but it doesn't show if there are any current connections, so I'd like to check yours out.
Is there any chance you could place the deb here in the first post? I don't have extras-devel enabled. |
Re: [Announce] OpenSSH status widget
Quote:
|
Re: [Announce] OpenSSH status widget
I uninstalled SSH Status and Switcher thinking it might be the root of my issue, but this persists:
Code:
~ $ openssh-status-config.py |
Re: [Announce] OpenSSH status widget
Quote:
/home/user/.openssh-status-widget and copy these lines: Code:
[options] |
Re: [Announce] OpenSSH status widget
I just uploaded v1.1-3 to extras-devel.
Changes: *bugfix: empty config file made app crash:eek: All cases of a non-working config file are tested, but if there's still a fault, please let me know. |
Re: [Announce] OpenSSH status widget
Nice! Well, due to extreme slowness of http://maemo.org/packages/ (is it that slow for everybody or just me?) I wasn't able to download any of the packages, so I guess I'll just wait 'til it hits extras-testing :D
|
Re: [Announce] OpenSSH status widget
Quote:
Code:
/etc/init.d/ssh start |
Re: [Announce] OpenSSH status widget
Quote:
http://maemo.org/packages/package_in...-widget/1.1-3/ |
Re: [Announce] OpenSSH status widget
Quote:
|
Re: [Announce] OpenSSH status widget
1 Attachment(s)
Quote:
Edit: Scratch that, the package website just takes really long to load, and I managed to download the package after waiting for 5-10 minutes... So I downloaded and installed openssh-status-widget_1.1-3_armel.deb, however, the status-applet does not appear to display any image (see attachment (yeah, my battery is really low :D ), it's the blank entry at the bottom-right). When pressed, it does not respond at all. Any idea what might cause this? |
Re: [Announce] OpenSSH status widget
Quote:
Code:
/usr/lib/hildon-desktop/openssh-status-widget.py |
Re: [Announce] OpenSSH status widget
Quote:
Code:
BusyBox v1.23.1 (Debian 1.23.1power2) built-in shell (ash) |
Re: [Announce] OpenSSH status widget
Quote:
Code:
dbus-send --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog string:qwertz uint32:0 string: If so (and if not also:D) try this one: Code:
run-standalone.sh dbus-send --print-reply --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog string:qwertz uint32:0 string:dummy |
Re: [Announce] OpenSSH status widget
Quote:
|
Re: [Announce] OpenSSH status widget
I tried, and the outcome is interesting :)
As root, the first command fails and the second succeeds. However, when I tried them as a normal user (not root), both of them worked! Here is the output: Code:
BusyBox v1.23.1 (Debian 1.23.1power2) built-in shell (ash) |
Re: [Announce] OpenSSH status widget
Quote:
Code:
/usr/lib/hildon-desktop/openssh-status-widget.py |
Re: [Announce] OpenSSH status widget
Quote:
As user: Code:
BusyBox v1.23.1 (Debian 1.23.1power2) built-in shell (ash) |
Re: [Announce] OpenSSH status widget
Quote:
Still an empty button? |
Re: [Announce] OpenSSH status widget
Quote:
|
Re: [Announce] OpenSSH status widget
Quote:
Difficult to remember, but I probably set a root password (?) |
Re: [Announce] OpenSSH status widget
3 Attachment(s)
Quote:
Perhaps you chould add a instruction to the first post that you should run the OSW Options configuration once before using it? I couldn't find anywhere that this was necessary. Thanks a lot for all your help and patience, and for the status-widget of course! :) PS.: I love the blowfish icon |
Re: [Announce] OpenSSH status widget
Quote:
If so, an exclusion can be added not to ask for a password for the relevant commands (i never did this before, will have to try). And if that works an option in the configuration dialog would be useful. Edit: I was wrong here - the opposite is true. Sudser let's you execute sudo without a password. I'll have a look on how to execute the relevant commands without a password. |
Re: [Announce] OpenSSH status widget
Quote:
Nice that it works now. :cool: |
Re: [Announce] OpenSSH status widget
v1.2-1 is uploaded!
Main change: the sudo password issue is solved. I put all sudo commands in an extra shell script and added an entry in the sudoers.d directory. @handaxe: This could work for you. I uninstalled Sudser, which made sudo ask me for a password and the widget not switch anymore, just as you reported. This new version works properly again on my device. Changes: *bugfix: typo led to empty button on fresh install *enabled sudo commands without password |
Re: [Announce] OpenSSH status widget
Quote:
Ok, if I run Code:
/usr/sbin/openssh-status.sg start_sshd |
Re: [Announce] OpenSSH status widget
Quote:
I guess you mean the button appears in the status menu but it won't start/stop the server. Maybe your device doesn't update the sudoer's list. You can try as root: Code:
/usr/sbin/update-sudoers 1. Start the configuration dialog 2. Switch "Run server at system startup" 3. Switch one of the widget's options 3. Close and re-open the configuration dialog Did it save any configuration? |
Re: [Announce] OpenSSH status widget
Quote:
Now, having set it, it sticks, and then the widget works as advertised. Brilliant & thanks. |
Re: [Announce] OpenSSH status widget
Strange, but after some time, the app indicator "forgets" that the server is enabled. Pressing the drop-drown generates an "already running, updating screen" (or words to that effect) message and the indicator reappears.
Is this "sleep" related? |
Re: [Announce] OpenSSH status widget
Quote:
Code:
ps aux | grep -c usr/sbin/sshd Anyway, when "Stop tracking status when off" is enabled (you do have it enabled?) the widget immediately stops tracking as soon as status OFF is recognized. To handle those occasional short intervals correctly, when the sshd daemon seems non-listed in the process list, a time-out needs to be added before tracking stops. |
Re: [Announce] OpenSSH status widget
Quote:
Even when the server is turned off, every once in a while the 'SSH' icon appears in the top tray-icon area (right of the clock) very briefly. It usually happens when I (dis)connect from a internet connection, or update my repositories. It even happens when "Stop tracking status when off" is enabled. Do you have any idea why this might happen? |
Re: [Announce] OpenSSH status widget
Quote:
The timeout for switching the display to off is now added. For the moment I used the shortest time possible (just one more checking, that is 2 seconds) not to delay updating the display to OFF too much. This affects only one situation, when the server is waiting for 1 connection to close (and when the server is stopped externally of course). v1.2-2 is uploaded. Changes: *added timeout to avoid mistaken status off *cosmetic change: message "display updated" |
All times are GMT. The time now is 10:29. |
vBulletin® Version 3.8.8