consoleserver
is written in golang and is a part of microservice of
xcat3. It can work as a independent
tool to provide the terminal session service. Terminal session could run in
the background and help logging the terminal content.
consoleserver
intent to support multiple types of terminal plugins, currently
ssh
is support as OpenBMC use ssh
as the SOL method and cmd
is a general
driver to support command session.
consoleserver
can be divided into two parts:
-
daemon part:
consoleserver
, expose rest api interface to define and control the session node. -
client part:
congo
, a command line tool to define session or connect to the session. Multiple client sessions could be shared.
Currently, this tool is in the development stage, there is no binary release. Please setup golang SDK, GOPATH environment variable and glide tool at first.
git clone https://github.com/chenglch/consoleserver.git
cd consoleserver
make install
Please refer to ssl
daemon is running in the background. To support a large amount of sessions,
please use ulimit -n <number>
command to set the number of open files.
consoleserver &
congo is the client command. Use congo help to see the detail.
congo create testnode driver=ssh ondemand=false --params user=root,host=10.5.102.73,port=22,password=<password>
or with ssh private key
congo create testnode driver=ssh ondemand=false --params user=root,host=10.5.102.73,port=22,private_key=<priavte_key_path>
or general command driver
congo create testnode driver=cmd ondemand=false --params cmd="ssh -l root -p 22 10.5.102.73"
congo list
congo show testnode
congo console testnode
Please refer to rest api