Giter VIP home page Giter VIP logo

cscreen's Introduction

cscreen

Allows to run multiple consoles in one screen session. Perfect for monitoring and logging all serial consoles in your data center in one screen instance

Configuration

The file /etc/cscreenrc needs to be adjusted which commands for every required console window.

The command "screen", followed by its well documented command line options, creates new windows. Typically the option "-t title" and "-L" to enable logging are used, followed by the actual command.

The optional command "defhstatus" can be used for additional information, which is then shown in the window status line.

defhstatus "ThisHost ttyS0"
screen -t OtherHost /dev/ttyS0 115200
defhstatus "RemoteHOST SOL-Wrapper"
screen -t RemoteHost -L /usr/share/cscreen/sol-via-ipmi.sh remotehost
defhstatus "RemoteHOST IPMI"
screen -t RemoteHost -L ipmitool -I lanplus -H remotehost -U username -P password sol activate
defhstatus "KVM VM"
screen -t VM -L virsh -c 'qemu:///system' console vm

sol-via-ipmi.sh

This script waits until the remote host responds to ping. Once it is reachable, an existing Serial-over-LAN connection will be terminated. Then a new SOL connection will be established. Note: the username and password of the BMC needs to be provided via the configuration file /etc/cscreen-credentials.conf

cscreen_BMC_user=X
cscreen_BMC_password=Y

sol-via-ssh.sh

This script waits until the remote host responds to ping. Once it is reachable, a new SOL connection via SSH to port 2200 will be established. Note: the username and password of the BMC needs to be provided via the configuration file /etc/cscreen-credentials.conf Note: this script requires sshpass to provide the SSH password to the remote host.

cscreen_BMC_user=X
cscreen_BMC_password=Y

cscreen's People

Contributors

fbuihuu avatar hramrach avatar olafhering avatar schoolguy avatar watologo1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cscreen's Issues

Username `_cscreen` is invalid for most modern distros

During installation on SLES 15.5 useradd is complaining about the fact that the username _cscreen is invalid. This is because most modern distros have tightened the requirements for usernames to only allow less characters.

sconsole1:~ # zypper in system-user-cscreen
Repository-Daten werden geladen...
Installierte Pakete werden gelesen...
Paketabhängigkeiten werden aufgelöst...

Das folgende NEUE Paket wird installiert:
  system-user-cscreen

Das folgende Paket wird vom Anbieter nicht unterstützt:
  system-user-cscreen

1 neues Paket zu installieren.
Gesamtgröße des Downloads: 0 B. Bereits im Cache gespeichert: 11,5 KiB. Nach der Operation werden zusätzlich 103,0 B belegt.
Continue? [j/n/v/...? zeigt alle Optionen] (j): 
Im Cache system-user-cscreen-1.5-150500.41.1.noarch.rpm                                                                                                                                                                                                   (1/1),  11,5 KiB    

Überprüfung auf Dateikonflikte läuft: ................................................................................................................................................................................................................................[fertig]
/usr/sbin/useradd -r -c cscreen daemon user -d /var/lib/cscreen -U -u _cscreen _cscreen -s /bin/bash
useradd: invalid user ID '_cscreen'
error: %prein(system-user-cscreen-1.5-150500.41.1.noarch) scriptlet failed, exit status 1
error: system-user-cscreen-1.5-150500.41.1.noarch: install failed
(1/1) Installieren: system-user-cscreen-1.5-150500.41.1.noarch .......................................................................................................................................................................................................[Fehler]
Installation von system-user-cscreen-1.5-150500.41.1.noarch fehlgeschlagen:
Fehler: Subprocess failed. Error: RPM fehlgeschlagen: Kommando mit Status 1 beendet.
Abbrechen, wiederholen, ignorieren? [a/w/i] (a): a
Während oder nach der Installation/dem Entfernung von Paketen ist ein Problem aufgetreten:
Die Installation wurde gemäß Anweisung abgebrochen.
In der Fehlermeldung oben finden Sie einen entsprechenden Hinweis.
sconsole1:~ # cat /etc/os-release
NAME="SLES"
VERSION="15-SP5"
VERSION_ID="15.5"
PRETTY_NAME="SUSE Linux Enterprise Server 15 SP5"
ID="sles"
ID_LIKE="suse"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:15:sp5"
DOCUMENTATION_URL="https://documentation.suse.com/"

Moving cscreenrc_allow_update probably introduced security issue

In #2 you moved cscreenrc_allow_update from a directory that is only writeable for root (/etc/) to a world-writeable directory (/dev/shm/), which introduces the "usual" security risks of hardcoded filenames in world writeable directories, for example symlink attacks.

Unless you are very sure that there is absolutely no risk (which would surprise me), I'd recommend to use a directory that is only writeable by root, for example /run/.

systemd service file hard codes _cscreen for User/Group

cscreend.service has:

[Service]
User=_cscreen
Group=_cscreen

But this breaks when someone sets a SCREEN_OWNER in /etc/sysconfig/cscreen . When SCREEN_OWNER is set to a custom value, it should be used for User/Group instead.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.