Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

special banner with advanced ssh login info and miniscripts #728

Closed
viisauksena opened this issue Apr 18, 2016 · 9 comments
Closed

special banner with advanced ssh login info and miniscripts #728

viisauksena opened this issue Apr 18, 2016 · 9 comments
Labels
0. type: enhancement The changeset is an enhancement needs work

Comments

@viisauksena
Copy link
Contributor

viisauksena commented Apr 18, 2016

interest in obtaining ... ?

  1. much more info on login via ssh
  2. some really basic shell scripts which make config much much easier

if so : i could build some generic ones .. maybe called gluon-ssh-helpers
as you see : the naming of the helper scripts equals the info from login

# helper scripts to turn on or off, or set values 
# selfexplaining, all with usage
/usr/bin$ ls
autoupdater-status  branch  clientwifi  contact  fastd-status  geoguess  help  hop_penalty  location  lon lat alt MoL  MoW  nodeinfo  nodename  sshkeys  status  v4up
# example ssh-login 
#
########################################
checking v4 - empty if v4 available 
you may want IPv4, try :   udhcpc -i br-client -q -S -n
########################################
### IP :            inet6 addr: 2001:bf7:2810:ff42:c66e:XXXX:XXXXXXXXX/64 Scope:Global
### from ssh : fe80::224:d7ff:XXXXXXX%br-client 40511 fe80::c66e:1fff:XXXXXXX%br-client 22
### known sshkeys : fuzzle birger mar fabzgy@fabzgy wuschl fuzzle - active : 1
### active sshkeys : fuzzle (1 of 6)
### uptime/load :   01:51:40 up 9 days, 10:16,  load average: 0.07, 0.17, 0.20
########################################
### pubkey :  dbddc1b76XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX85645
### firmware :  v2016.1.3   branch :  stable   autoupdater : 0
### hardware :  TP-Link TL-WR841N/ND v9
########################################
### MoL:'1'   MoW:'0'   fastd:'1' clientwifi:1
### Location:  '0' lat: lon: alt:
### contact :  'kaulquappen supäää'
########################################
### connected to this node  :    0
### number of nodes (inkl SN) :  307
### number of total clients :    541
### number of GW :  8  - connected to =>        Master-SN4 (234) ea:e1:28:f9:09:08 [     ibss0]:  79 - 32MBit/32MBit
########################################
### /sys/class/net/bat0/mesh/hop_penalty :    33
### batctl gw :      client (selection class: 20)
####logread#############################
Tue Apr 19 01:51:40 2016 daemon.info fastd[1465]: resolving host `sn10.freiburg.freifunk.net' for peer <mesh_vpn_backbone_peer_sn10>...
Tue Apr 19 01:51:40 2016 daemon.info fastd[1465]: resolving host `sn10.freiburg.freifunk.net' failed: Name or service not known
Tue Apr 19 01:51:41 2016 daemon.info fastd[1465]: resolving host `sn8.freiburg.freifunk.net' for peer <mesh_vpn_backbone_peer_sn8>...
########################################
1 root@fuzzle_solar:~# MoL
usage: /usr/bin/MoL 1     or     /usr/bin/MoL 0
1 root@fuzzle_solar:~# MoW
usage: /usr/bin/MoW 1     or     /usr/bin/MoW 0
1 root@fuzzle_solar:~# alt
usage: /usr/bin/alt <altitude in meter>   example : /usr/bin/alt 122
1 root@fuzzle_solar:~# lon
usage: /usr/bin/lon <longitude>    example : /usr/bin/lon 5.6789
1 root@fuzzle_solar:~# lat
usage: /usr/bin/lat <latitude>      example : /usr/bin/lat 45.6789
1 root@fuzzle_solar:~# location 
usage: /usr/bin/location 1     or     /usr/bin/location 0
1 root@fuzzle_solar:~# fastd-status 
usage: /usr/bin/fastd-status 1     or     /usr/bin/fastd-status 0
1 root@fuzzle_solar:~# autoupdater-status 
usage: /usr/bin/autoupdater-status 1     or     /usr/bin/autoupdater-status 0
1 root@fuzzle_solar:~# branch 
usage: /usr/bin/branch <branch>         choose from : stable support beta usbtesting experimental
1 root@fuzzle_solar:~# clientwifi 
usage: /usr/bin/clientwifi <on|off|status>      example : /usr/bin/clientwifi on
1 root@fuzzle_solar:~# hop_penalty 
usage: /usr/bin/hop_penalty <hop_penalty>    example /usr/bin/hop_penalty 15
1 root@fuzzle_solar:~# sshkeys 
usage: /usr/bin/sshkeys <show|active|status|nr>     show sshkeys or nr 

example to copy and love https://github.com/viisauksena/gluon-banner

@neocturne
Copy link
Member

Having a more useful banner would be nice, but there's also a downside: network connectivity to mesh nodes is sometimes flaky, and in such a case any surplus data on login is a burden. Mostly an admin logging into a node is interested in one specific piece of information, a banner would either be very long or most likely useless.

Allowing high-level configuration on the shell is a completely separate issue (please open one ticket per issue!) This should be solved by refactoring the config scripts of the expert mode into a Lua library and using the same implementation for both the expert mode and on the shell. Doing this now is probably not a good idea, as we plan to rework the way Gluon handles configuration (by not using UCI as the main config storage, but generating UCI from another config system; this will be part of my Google Summer of Code project, if my proposal is accepted.)

@viisauksena
Copy link
Contributor Author

viisauksena commented Apr 20, 2016

if you had bad connection you can do maintainance "blind" ..
ssh bla@foo "command" should do the trick .. then you dont get the /etc/profile data - but its also possible to make a BIG note to use buildin helper - which will then do the job ... the helper scripts are very very useful - for me and for many people who know the shell only a little. This fill the missing config possibilities while nodes are runing and/or even being without physical access

@belzebub40k
Copy link
Contributor

belzebub40k commented Apr 20, 2016

Maybe it would be an idea to minimize the banner to something like: type 'help' for more information

And implement a helper script named help which shows some stats about the node and hints for other useful commands.

@viisauksena
Copy link
Contributor Author

viisauksena commented Jul 14, 2016

i renew the question .. would this be merged, and prefferable where ???
actually i have done 1 big package .. which easily could be split in two,
one miniscript package and based on that one info package .. for much more info.
(basicaly like above example) - i could clean it up (remove freiburg specific parts) and make a push request.

@neocturne
Copy link
Member

Personally, I don't like the banner very much, so I'd like to get some more feedback on this feature from other users. @belzebub40k's suggestion sounds like a good idea.

As written before, it is a bad time to add configuration helper scripts, as they would need to be rewritten soon.

@viisauksena
Copy link
Contributor Author

viisauksena commented Jul 27, 2016

i agree fully to @NeoRaider @belzebub40k ... all the miniscripts are at least nothing more than "clever" utilized commands and could sit in a special help or nodeinfo file - which make nodeinfo a bit trickier ...
as i have already build some for freiburg long ago - it should be easy done on a rainy afternoon - and also easy rewriteable when things change in the background. (because waiting for undefined is boring - no offense meant ;)

@rotanid rotanid added 0. type: enhancement The changeset is an enhancement needs work 2. status: rfc request for comments and removed 2. status: rfc request for comments labels Aug 22, 2016
@SimJoSt
Copy link
Contributor

SimJoSt commented Dec 12, 2016

I would like to comment on the banner feature without cluttering this ticket. @viisauksena can you please split the two suggestions here in two separate tickets?
I also wouldn't have a problem with discussing the banner in #901, as it captures my intentions already.
Some clarity needed.

@viisauksena
Copy link
Contributor Author

viisauksena commented Dec 12, 2016

mhm, yes it would be better to have these miniscripts and advanced info seperated.
(but this is also not soo easy because they easy depend on each other - at least like in the proposal i made
also there will be a tendency to have this not pinned to one of many possible variants , like mesh (babel, ibss, 80211s), and uplink (wireguard, fastd, l2tp) and the existance of LAN/WAN , 2g/5g , whatever fancy/default package and so on .. so it may sound straight forward but it isnt necessarily while gluon is becoming a pretty complex framework)

and this issue is pretty on hold, at least until Gluon goes LEDE ...
you saw the proposal from @rubo77 in #901 ...

lua -e 'print(require("platform_info").get_board_name())'
lua -e 'print(require("platform_info").get_model())'
cat /lib/gluon/gluon-version /lib/gluon/release

@viisauksena
Copy link
Contributor Author

the script is still available on
https://github.com/viisauksena/gluon-banner
(and so can be added via modules and entry in site.mk - it is slightly freiburg based)
but i dont see that this ever is going to come in gluon - maybe in future time when lede is settled and there is some time

SvenRoederer added a commit to SvenRoederer/freifunk-gluon_core that referenced this issue Sep 29, 2019
changes from v17.01.1 to v17.01.2

2da512e LEDE v17.01.2: adjust config defaults
65eec8b build: ensure that flock is available for make download
4053c4f include/toplevel: set env GIT_ASKPASS=/bin/true
e5db08e base-files: network.sh: fix a number of IPv6 logic flaws
8a42d4d mwlwifi: update to version 10.3.4.0 / 2017-06-06
f709597 automake: import upstream fix for perl 5.26
df4363b base-files: network.sh: properly report local IPv6 addresses
4fbd072 kernel: update kernel 4.4 to 4.4.71
443d705 Add missing APU1 reference to x86 board.d
524ed50 base-files: always set proto passed to _ucidef_set_interface()
bf6216e lantiq: fix broadcasts and vlans in two iface mode
36ccbbd lantiq: select kmod-mt7603 instead of kmod-mt76 for WBMR-300HPD
4186d73 lantiq: use the P2812HNUF* wan port as wan
254bf79 lantiq: xrx200: use vlan for ethernet wan port
b78bcdf x86: disable X2APIC support for legacy subtargets
e78a641 umdns: remove superfluous include in init script
cdfc678 dnsmasq: bump to 2.77
9e20cc5 dnsmasq: make tftp root if not existing
ebf46d2 dnsmasq: use logical interface name for dhcp relay config
78edfff dnsmasq: don't point --resolv-file to default location unconditionally
b1257d8 ar71xx: fix Wallys DR344 GPIO-connected LEDs and button
21a7e40 ar71xx: set GE interface as wan by default in Wallys DR344
a412350 ar71xx: fix GE interface support in Wallys DR344
dfecce6 toolchain/gdb: update to version 7.12.1
fe5e343 usbmode: update usb-modeswitch-data to 20170205
4baf0ea usbmode: update to latest version
7c1e588 usbmode: Update to latest HEAD
22478bf samba: bump PKG_RELEASE
757353c firewall: resync with master
4bd3b8f mac80211, hostapd: always explicitly set beacon interval
e194e1b hostapd: add legacy_rates option to disable 802.11b data rates.
20198f7 ipq806x: fix Netgear X4 R7500 ath10k firmware selection
784ceba treewide: select ath10k firmware explicit
0e31ce7 ath10k-firmware: do not select the qca988x by default
a44d7bf build: fix possible issue with kmod package having multiple AutoLoad's
e02b12c kernel: update kernel 4.4 to 4.4.70
2f92622 kernel: fix autoloading arch-specific modules
9c2bd3d backlight-pwm: fix module description
215c1d0 kernel: update kernel 4.4 to 4.4.69
d1a0fc3 binutils: fix build with host gcc < 4.9
d179aa8 util-linux: fix build with uclibc
dd19a41 dropbear: bump to 2017.75
51db1f5 samba: fix CVE-2017-7494
1165c0a umdns: update to the version 2017-05-22
74100f3 bcm53xx: add support for TP-LINK Archer C5 V2
dfe2cea firmware-utils: tplink-safeloader: add support for Archer C5 V2
0bef8f8 fstools: backport regression fix for volume_identify
379155d imagebuilder: fix bundling of DTS sources
dbaaeae image.mk: Generate cpiogz with root-owned files
4bd98e9 ramips: add om-watchdog to rut5xx DEVICE_PACKAGES
9423cf3 om-watchdog: add support for Teltonika RUT5xx (ramips)
38367c5 om-watchdog: cosmetic code style fixes
da4992f om-watchdog: cleanup Makefile
8011215 ar71xx: enable nand-utils in the mikrotik subtarget to ensure it makes it to initramfs
aba1b3c openvpn: update to v2.4.2
53e751e openvpn: add myself as maintainer
d40e2ef OpenVPN: Update to 2.4.1
98491a9 openvpn: add extra respawn parameters
bc58099 openvpn: move list of params and bools to a separate file
7f3ec01 ramips: fixup-mac-address: add missing include
d8cfeba dnsmasq: support dhcp_option config as a list
d1e0cc8 bcm53xx: backport DT patches for serial, thermal and MDIO
8619683 ramips: add factory firmware for Tp-Link C20i/C50
d90ff22 brcm63xx: fix invalid Asmax AR 1004g DTS reference
d49920e lantiq: fix avm fritz box mac addresses
79cd141 ramips: enable ramdisk for mt7621
bc0de27 ipq806x: fix EA8500 switch configuration
0c8f726 base-files: implement ucidef_set_hostname(), ucidef_set_ntpserver()
eb11207 mac80211: rt2800: fix mt7620 E2 channel registers
64fa4ea mac80211: rt2800: fix mt7620 vco calibration registers
820a396 mac80211: rt2x00: fix MT7620 LNA gain and VCO-after-ALC
5b91d2b mac80211: rt2x00: import upstream changes and rebase our patches
ab7087e rt2x00: mt7620: make fixes requested upstream
4314646 rt2x00: mt7620: yet another beauty session
ceefe61 mac80211: add rt2x00 debug symbols to PKG_CONFIG_DEPENDS
5ac51ad ath9k: fix power limits on init
a972879 ath: do not apply broken power limits with ATH_USER_REGD
503e496 odhcpd: update to version 2017-04-28 (FS#595)
c266641 odhcpd: update to version 2017-04-21
37cf921 build: fix symlinked .config handling
8b9f7bd ramips: WN3000RPv3: do not setup switch
bf534e4 brcm63xx: Add Observa VH4032N support
105d5b6 cns3xxx: use proper macro's for ID handling
49ce6d0 ramips: add support for Sanlinking D240
58ec566 ar71xx: select ATH79_NVRAM only by boards actually use it
7e2ad9c ramips: fix Sercomm NA930 compatible string
88cc06a ramips: remove Planex CS-QR10 sound device tree node
f1f0b92 ramips: cleanup SPI flash device tree properties usage
6aa0a85 ramips: remove DT pcie nodes for GL-MT300A/N
e200c66 rpcd: Explicitly link with lcrypt
28d6265 ramips: ZyXEL Keenetic Omni/Omni2: export gpio usb power
fd693bc ramips: ZyXEL Keenetic Viva: align factory images
5b2624d ramips: ZyXEL Keenetic Viva: export gpio usb power
a666236 ramips: add ip17xx support to WLI-TX4-AG300N
0405851 ramips: fix EX2700 wireless mac
a12655a ramips: ZyXEL Keenetic series update wan mac
9494825 ramips: ZyXEL Keenetic Omni align factory images
85bca2d ramips: correct keenetic-series switch index
1aee42c ramips: add support for Netgear WN3000RPv3
846457f ramips: fix mac address of miwifi-mini
7ee0937 feeds: add option to force feed update despite modified files
0f3c2d0 ramips: Clean duplicated status property for Omega2 WMAC in dtsi
26f07f6 ramips: fixed sms led polarity into dwr-512 DT
dbd2212 ramips: WN3000RPv3: do not setup switch
ae0e167 busybox: revert accidential version bump
fe0b171 busybox: nslookup_lede: mimic output format of old Busybox applet
a2ee9b7 busybox: nslookup_lede: fix compatibility with v1.25
af1d1eb x86: enable 4G high memory support for generic (32bit) subtarget
3bfe7ee generic: keep module aliases inside .modinfo
2bc8d5e ubox: bump to version 2017-03-10
1ab4126 kernel: use skb_cow_head() to deal with cloned skbs
1d1935b ar71xx: fix minor syntax error in /lib/upgrade/platform.sh
9117ef8 ramips: update DEVICE_PACKAGES for Ubiquiti EdgeRouter X
72fcdb6 openssl: Use mkhash for STAMP_CONFIGURED
5feb4f0 busybox: fix build of nslookup_lede applet without IPv6 (freifunk-gluon#728)
449880e busybox: Move libresolv detection to LEDE Makefile
9437fbb bcm53xx: backport BCM5301X patches
3ff31f8 bcm53xx: parepare for building more Linksys images
ad145e0 bcm53xx: prepare for building Archer C5 V2 image
3dbc417 ar71xx: add TP-LINK TL-WR841N/ND v12 image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. type: enhancement The changeset is an enhancement needs work
Projects
None yet
Development

No branches or pull requests

5 participants