diff --git a/Deployment.md b/Deployment.md index 129cd18..15f0cf8 100644 --- a/Deployment.md +++ b/Deployment.md @@ -2,6 +2,8 @@ This page documents how to deploy ssh-chat using various methods. You can run ssh-chat on port 22, but then you'll need to change the port of OpenSSH to something else like 2022. You can do this in `/etc/ssh/sshd_config`. Two services can't run on the same port like this. +There are two popular Service Managers for Unix-Like systems, OpenRC (BSD systems) and systemd (Linux). Eather one must be set up to run ssh-chat as a service (in the background). ssh-chat can be run as a user (not a daemon) but will stop servicing once the running user exits the terminal instance. + ## OpenRC `/etc/init.d/openrc`: @@ -53,7 +55,10 @@ After=network.target [Service] Type=simple -User=nobody +User=root +#You can store keys ouside of root and comment out 'User=root' then uncomment 'User=nobody' +#User=nobody + ExecStart=/PATH/TO/ssh-chat --bind=":22" -i="/PATH/TO/host_key" --admin="/PATH/TO/authorized_keys" AmbientCapabilities=CAP_NET_BIND_SERVICE Restart=always @@ -62,14 +67,16 @@ Restart=always WantedBy=multi-user.target ``` -Make sure all your paths are readable by the user you're running as. If it's `User=nobody`, then they need to be readable by everyone. It's best to make a separate user just for your ssh-chat service and use that. +Make sure all your paths are readable by the user you're running as. If it's `User=nobody`, then they need to be readable by everyone! + +It's best to make a separate user just for your ssh-chat service and store all files on this user. # Installation Steps: -The following installation steps can be used to automate the installation on Ubuntu Linux 16 (LTS), some slight modifications may be required for other distributions. +The following installation steps can be used to automate the installation on Ubuntu Linux 16 (LTS), some slight modifications may be required for other distributions. ```bash -$ wget https://github.com/shazow/ssh-chat/releases/download/v1.6/ssh-chat-linux_amd64.tgz +$ wget https://github.com/shazow/ssh-chat/releases/download/v1.7/ssh-chat-linux_amd64.tgz $ sudo tar -xf ssh-chat-linux_amd64.tgz -C /opt # extracts ssh-chat to /opt $ sudo ln -sf /opt/ssh-chat/ssh-chat /usr/local/bin/ssh-chat # creates a symlink in /usr/local/bin for convenience $ sudo ssh-keygen -t rsa -N '' -f /root/.ssh/id_rsa # generates a key/fingerprint for your server