Active Topics

 



Notices


Reply
Thread Tools
Posts: 136 | Thanked: 263 times | Joined on Nov 2012 @ Germany
#1
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:
  • puts a configurable button in the status menu to control the OpenSSH server and wifi power management
  • displays server status
  • offers connections overview
  • displays a customizable icon in the status area
  • displays wifi pm settings
  • detects conflicting "respawn" system setting and can disable it

    Widget options:
    • Enable tracking of server status
      When not enabled, just switch the server daemon on/off and call up the number of connections manually by long pressing the button.
    • Stop tracking when server is off
      Recommended for minimizing power consumption
    • Show status 'connected' in status area
      When one or more server connections are active the status area icon will show an additional symbol or alternatively change its color
    • Show dialog on long tap
      Shows a configurable dialog instead of disconnecting instantly
    • Show wifi power management button
    OpenSSH options:
    • Run server at system startup
      Switch autostart on/off
    • Stop server when not connected for xx minutes
      Stop server automatically when not needed
    Wifi pm options:
    • Keep wifi power management off when connected
      Avoid input lags caused by wifi power management. This feature handles server connections and client connections.
      Because keeping off power management drains the battery quite a lot there's an experimental toggle mode which allows to toggle power management every few seconds in order to find a balance between power consumption and appearing input lags.

The attached image shows the button when
  • server is on and ready
  • server is on with 3 active connections
  • server is waiting for 1 connection to close - wifi pm feature is disabled
  • server is off - wifi pm is kept off when connected
  • server is on with tracking disabled - wifi pm is in toggle mode when connected

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.
Attached Images
    

Last edited by rasmarc; 2017-01-31 at 21:40. Reason: New screenshots
 

The Following 15 Users Say Thank You to rasmarc For This Useful Post:
nokiabot's Avatar
Posts: 1,974 | Thanked: 1,834 times | Joined on Mar 2013 @ india
#2
nice nice i had been playing with ssh lately this will help .
btw add announce to thread title or it looks like help thread
 

The Following User Says Thank You to nokiabot For This Useful Post:
Posts: 65 | Thanked: 113 times | Joined on Mar 2011 @ Austria
#3
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?
 

The Following User Says Thank You to scy For This Useful Post:
nokiabot's Avatar
Posts: 1,974 | Thanked: 1,834 times | Joined on Mar 2013 @ india
#4
Originally Posted by scy View Post
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?
exact same problem here
 

The Following User Says Thank You to nokiabot For This Useful Post:
Posts: 136 | Thanked: 263 times | Joined on Nov 2012 @ Germany
#5
Originally Posted by scy View Post
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?
Thanks for the feedback. Please have a look at /etc/event.d/sshd and check if two lines are commented out:
Code:
#start on stopped rcS

#respawn
.
Originally Posted by scy View Post
And what also interests me: what is the command line instruction to count all ssh connections?
I used
Code:
ps aux | grep sshd: | grep -c @

I just uploaded v1.0-2 with corrected status detection when an error occurs.

Last edited by rasmarc; 2015-04-30 at 11:15.
 

The Following 2 Users Say Thank You to rasmarc For This Useful Post:
Posts: 65 | Thanked: 113 times | Joined on Mar 2011 @ Austria
#6
Thanks for the feedback and notes. I commented out the 2 lines and installed the new version. Now it works!
 

The Following User Says Thank You to scy For This Useful Post:
Posts: 65 | Thanked: 113 times | Joined on Mar 2011 @ Austria
#7
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.
 

The Following User Says Thank You to scy For This Useful Post:
Posts: 136 | Thanked: 263 times | Joined on Nov 2012 @ Germany
#8
Originally Posted by scy View Post
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.
This was made intentionally. When the server is completely off i saw no real benefit in tracking its status and so having the widget being active all the time. But in fact i can't estimate if this would have a noticeable effect on cpu or battery.

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.
 

The Following 2 Users Say Thank You to rasmarc For This Useful Post:
Posts: 136 | Thanked: 263 times | Joined on Nov 2012 @ Germany
#9
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
 

The Following 3 Users Say Thank You to rasmarc For This Useful Post:
Posts: 176 | Thanked: 468 times | Joined on Jan 2010 @ NL
#10
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.
__________________
Sony CMD J6 > HTC Canary > HTC Universal > Nokia N82 > Nokia N8 > Nokia N900 > HTC One X > Jolla > Nexus 5 > Nexus 5X > Pixel 2 / PinePhone

Last edited by ThomasAH; 2015-05-07 at 16:57.
 

The Following User Says Thank You to ThomasAH For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 17:37.