network/ssh-chat: Added (IRC-like chat server using ssh as a client)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
d1246370e2
commit
85d4ec0fe0
|
@ -0,0 +1,23 @@
|
|||
ssh-chat (IRC-like chat server using ssh as a client)
|
||||
|
||||
ssh-chat is a custom SSH server written in Go. Instead of a shell, you
|
||||
get a chat prompt.
|
||||
|
||||
Note that this is only the server. There is no dedicated client: users
|
||||
just use ssh to connect to the server.
|
||||
|
||||
This SlackBuild just repackages the official release binary, and does
|
||||
not attempt to compile anything.
|
||||
|
||||
There is no startup script; if you want to run ssh-chat as a daemon,
|
||||
add something like this to /etc/rc.d/rc.local:
|
||||
|
||||
if [ -x /usr/sbin/ssh-chat ]; then
|
||||
cd /
|
||||
/usr/sbin/ssh-chat <options> </dev/null >/dev/null 2>&1 &
|
||||
fi
|
||||
|
||||
Replace <options> with whatever options you want (one of which should
|
||||
be --log). If you'd rather run as a non-root user, prefix the command
|
||||
with e.g. "su - nobody -s ", and make sure your --bind has a port
|
||||
numbered higher than 1024.
|
|
@ -0,0 +1,19 @@
|
|||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description.
|
||||
# Line up the first '|' above the ':' following the base package name, and
|
||||
# the '|' on the right side marks the last column you can put a character in.
|
||||
# You must make exactly 11 lines for the formatting to be correct. It's also
|
||||
# customary to leave one space after the ':' except on otherwise blank lines.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
ssh-chat: ssh-chat (IRC-like chat server using ssh as a client)
|
||||
ssh-chat:
|
||||
ssh-chat: ssh-chat is a custom SSH server written in Go. Instead of a shell, you
|
||||
ssh-chat: get a chat prompt.
|
||||
ssh-chat:
|
||||
ssh-chat: Note that this is only the server. There is no dedicated client: users
|
||||
ssh-chat: just use ssh to connect to the server.
|
||||
ssh-chat:
|
||||
ssh-chat:
|
||||
ssh-chat:
|
||||
ssh-chat:
|
|
@ -0,0 +1,116 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH SSH-CHAT 8 "2020-11-18" "1.10" "SlackBuilds.org"
|
||||
.SH NAME
|
||||
ssh-chat \- custom ssh server providing IRC-like chat
|
||||
.
|
||||
.nr rst2man-indent-level 0
|
||||
.
|
||||
.de1 rstReportMargin
|
||||
\\$1 \\n[an-margin]
|
||||
level \\n[rst2man-indent-level]
|
||||
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
||||
-
|
||||
\\n[rst2man-indent0]
|
||||
\\n[rst2man-indent1]
|
||||
\\n[rst2man-indent2]
|
||||
..
|
||||
.de1 INDENT
|
||||
.\" .rstReportMargin pre:
|
||||
. RS \\$1
|
||||
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
|
||||
. nr rst2man-indent-level +1
|
||||
.\" .rstReportMargin post:
|
||||
..
|
||||
.de UNINDENT
|
||||
. RE
|
||||
.\" indent \\n[an-margin]
|
||||
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
||||
.nr rst2man-indent-level -1
|
||||
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
||||
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
||||
..
|
||||
.\" RST source for ssh-chat(1) man page. Convert with:
|
||||
.
|
||||
.\" rst2man.py ssh-chat.rst > ssh-chat.8
|
||||
.
|
||||
.\" rst2man.py comes from the SBo development/docutils package.
|
||||
.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
ssh\-chat [\fI\-options\fP]
|
||||
.SH DESCRIPTION
|
||||
.sp
|
||||
ssh\-chat is a custom SSH server written in Go. Instead of a shell,
|
||||
clients get a chat prompt when they connect.
|
||||
.sp
|
||||
There is no specific client for ssh\-chat; use a standard ssh client to connect.
|
||||
.SH OPTIONS
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-v\fP,\fB \-\-verbose
|
||||
Show verbose logging.
|
||||
.TP
|
||||
.B \-\-version
|
||||
Print version and exit.
|
||||
.TP
|
||||
.BI \-i\fP,\fB \-\-identity\fB= file
|
||||
Private key to identify server with. (default: ~/.ssh/id_rsa)
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-bind=host:port
|
||||
Host and port to listen on. (default: 0.0.0.0:2022)
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.BI \-\-admin\fB= file
|
||||
File of public keys who are admins.
|
||||
.TP
|
||||
.BI \-\-whitelist\fB= file
|
||||
Optional file of public keys who are allowed to connect.
|
||||
.TP
|
||||
.BI \-\-motd\fB= file
|
||||
Optional Message of the Day file.
|
||||
.TP
|
||||
.BI \-\-log\fB= file
|
||||
Write chat log to this file.
|
||||
.TP
|
||||
.BI \-\-pprof\fB= yes
|
||||
Enable pprof http server for profiling.
|
||||
.TP
|
||||
.B \-h\fP,\fB \-\-help
|
||||
Show this help message
|
||||
.UNINDENT
|
||||
.SH DEMO
|
||||
.sp
|
||||
To connect to the project\(aqs ssh\-chat server:
|
||||
.sp
|
||||
$ ssh ssh.chat
|
||||
.SH EXAMPLES
|
||||
.sp
|
||||
ssh\-chat \-\-verbose \-\-bind ":22" \-\-identity ~/.ssh/id_dsa
|
||||
.sp
|
||||
To bind on port 22, you\(aqll need to make sure it\(aqs free (move any other ssh
|
||||
daemons to another port) and run ssh\-chat as root (or with sudo).
|
||||
.sp
|
||||
Note that ssh\-chat doesn\(aqt run in the background. If you want to \(aqdaemonize\(aq it,
|
||||
use the \-\-log option, and run it with a command like:
|
||||
.sp
|
||||
$ cd / ; ssh\-chat [options] \-\-log=logfile </dev/null >/dev/null 2>&1 &
|
||||
.SH COPYRIGHT
|
||||
.sp
|
||||
See the file /usr/doc/ssh\-chat\-1.10/LICENSE for license information.
|
||||
.SH AUTHORS
|
||||
.sp
|
||||
ssh\-chat was written by Andrey Petrov.
|
||||
.sp
|
||||
This man page written for the SlackBuilds.org project
|
||||
by B. Watson, and is licensed under the WTFPL.
|
||||
.SH SEE ALSO
|
||||
.sp
|
||||
ssh(1), sshd(1)
|
||||
.sp
|
||||
The ssh\-chat homepage: \fI\%https://github.com/shazow/ssh\-chat/\fP
|
||||
.\" Generated by docutils manpage writer.
|
||||
.
|
|
@ -0,0 +1,62 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Slackware build script for ssh-chat
|
||||
|
||||
# Written by B. Watson (yalhcru@gmail.com)
|
||||
|
||||
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
|
||||
|
||||
PRGNAM=ssh-chat
|
||||
VERSION=${VERSION:-1.10}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
i?86) ARCH=i586 ;;
|
||||
arm*) ARCH=arm ;;
|
||||
*) ARCH=$( uname -m ) ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
CWD=$(pwd)
|
||||
TMP=${TMP:-/tmp/SBo}
|
||||
PKG=$TMP/package-$PRGNAM
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
case "$ARCH" in
|
||||
i?86) SRCARCH="386" ;;
|
||||
x86_64) SRCARCH="amd64" ;;
|
||||
*) echo "Unsupported ARCH '$ARCH' (only i586, i686, x864_64 supported)" 1>&2
|
||||
exit 1 ;;
|
||||
esac
|
||||
|
||||
set -e
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG $OUTPUT
|
||||
cd $TMP
|
||||
rm -rf $PRGNAM-$VERSION
|
||||
mkdir -p $PRGNAM-$VERSION
|
||||
cd $PRGNAM-$VERSION
|
||||
tar xvf $CWD/$PRGNAM-linux_$SRCARCH.tgz
|
||||
cd $PRGNAM
|
||||
chown -R root:root .
|
||||
|
||||
mkdir -p $PKG/usr/sbin $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
install -m0755 $PRGNAM $PKG/usr/sbin
|
||||
install -m0644 README* LICENSE* $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
|
||||
# man page by SlackBuild author
|
||||
mkdir -p $PKG/usr/man/man8
|
||||
gzip -9 < $CWD/$PRGNAM.8 > $PKG/usr/man/man8/$PRGNAM.8.gz
|
||||
|
||||
# include our README since it has Slack-specific stuff.
|
||||
cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README_SBo.txt
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
|
||||
mkdir -p $PKG/install
|
||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||
|
||||
cd $PKG
|
||||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|
|
@ -0,0 +1,10 @@
|
|||
PRGNAM="ssh-chat"
|
||||
VERSION="1.10"
|
||||
HOMEPAGE="https://github.com/shazow/ssh-chat/"
|
||||
DOWNLOAD="https://github.com/shazow/ssh-chat/releases/download/v1.10/ssh-chat-linux_386.tgz"
|
||||
MD5SUM="21313e16a3ffcb2659231d93d4010d40"
|
||||
DOWNLOAD_x86_64="https://github.com/shazow/ssh-chat/releases/download/v1.10/ssh-chat-linux_amd64.tgz"
|
||||
MD5SUM_x86_64="624d31da8f76331bc03bd07f3ff6fd4c"
|
||||
REQUIRES=""
|
||||
MAINTAINER="B. Watson"
|
||||
EMAIL="yalhcru@gmail.com"
|
|
@ -0,0 +1,104 @@
|
|||
.. RST source for ssh-chat(1) man page. Convert with:
|
||||
.. rst2man.py ssh-chat.rst > ssh-chat.8
|
||||
.. rst2man.py comes from the SBo development/docutils package.
|
||||
|
||||
.. |version| replace:: 1.10
|
||||
.. |date| date::
|
||||
|
||||
========
|
||||
ssh-chat
|
||||
========
|
||||
|
||||
-----------------------------------------
|
||||
custom ssh server providing IRC-like chat
|
||||
-----------------------------------------
|
||||
|
||||
:Manual section: 8
|
||||
:Manual group: SlackBuilds.org
|
||||
:Date: |date|
|
||||
:Version: |version|
|
||||
|
||||
SYNOPSIS
|
||||
========
|
||||
|
||||
ssh-chat [*-options*]
|
||||
|
||||
DESCRIPTION
|
||||
===========
|
||||
|
||||
ssh-chat is a custom SSH server written in Go. Instead of a shell,
|
||||
clients get a chat prompt when they connect.
|
||||
|
||||
There is no specific client for ssh-chat; use a standard ssh client to connect.
|
||||
|
||||
OPTIONS
|
||||
=======
|
||||
|
||||
-v, --verbose
|
||||
Show verbose logging.
|
||||
|
||||
--version
|
||||
Print version and exit.
|
||||
|
||||
-i, --identity=file
|
||||
Private key to identify server with. (default: ~/.ssh/id_rsa)
|
||||
|
||||
--bind=host:port
|
||||
Host and port to listen on. (default: 0.0.0.0:2022)
|
||||
|
||||
--admin=file
|
||||
File of public keys who are admins.
|
||||
|
||||
--whitelist=file
|
||||
Optional file of public keys who are allowed to connect.
|
||||
|
||||
--motd=file
|
||||
Optional Message of the Day file.
|
||||
|
||||
--log=file
|
||||
Write chat log to this file.
|
||||
|
||||
--pprof=yes
|
||||
Enable pprof http server for profiling.
|
||||
|
||||
-h, --help Show this help message
|
||||
|
||||
DEMO
|
||||
====
|
||||
|
||||
To connect to the project's ssh-chat server:
|
||||
|
||||
$ ssh ssh.chat
|
||||
|
||||
EXAMPLES
|
||||
========
|
||||
|
||||
ssh-chat --verbose --bind ":22" --identity ~/.ssh/id_dsa
|
||||
|
||||
To bind on port 22, you'll need to make sure it's free (move any other ssh
|
||||
daemons to another port) and run ssh-chat as root (or with sudo).
|
||||
|
||||
Note that ssh-chat doesn't run in the background. If you want to 'daemonize' it,
|
||||
use the --log option, and run it with a command like:
|
||||
|
||||
$ cd / ; ssh-chat [options] --log=logfile </dev/null >/dev/null 2>&1 &
|
||||
|
||||
COPYRIGHT
|
||||
=========
|
||||
|
||||
See the file /usr/doc/ssh-chat-|version|/LICENSE for license information.
|
||||
|
||||
AUTHORS
|
||||
=======
|
||||
|
||||
ssh-chat was written by Andrey Petrov.
|
||||
|
||||
This man page written for the SlackBuilds.org project
|
||||
by B. Watson, and is licensed under the WTFPL.
|
||||
|
||||
SEE ALSO
|
||||
========
|
||||
|
||||
ssh(1), sshd(1)
|
||||
|
||||
The ssh-chat homepage: https://github.com/shazow/ssh-chat/
|
Loading…
Reference in New Issue