added a note to create the systemd config file

David Pellerin 2018-05-25 11:20:48 -04:00
parent a7e9322666
commit 54a5f4c372

@ -73,8 +73,7 @@ $ sudo ln -sf /opt/ssh-chat/ssh-chat /usr/local/bin/ssh-chat # creates a
$ sudo ssh-keygen -t rsa -N '' -f /root/.ssh/id_rsa # generates a key/fingerprint for your server $ sudo ssh-keygen -t rsa -N '' -f /root/.ssh/id_rsa # generates a key/fingerprint for your server
$ sudo sed -i -e '/^Port/s/^.*$/Port 2222/' /etc/ssh/sshd_config # ensures that system sshd runs on port 2222 $ sudo sed -i -e '/^Port/s/^.*$/Port 2222/' /etc/ssh/sshd_config # ensures that system sshd runs on port 2222
$ sudo service ssh restart # restarts sshd (now on port 2222) $ sudo service ssh restart # restarts sshd (now on port 2222)
$ sudo mv /home/ubuntu/ssh-chat.service /etc/systemd/system # moves systemd config into systemd system folder - create /etc/systemd/system/ssh-chat.service based on the instructions above
$ sudo chown root.root /etc/systemd/system/ssh-chat.service # sets permissions of systemd script
$ sudo systemctl daemon-reload # restarts systemd daemon $ sudo systemctl daemon-reload # restarts systemd daemon
$ sudo systemctl enable ssh-chat # ensures ssh-chat will start up after a reboot $ sudo systemctl enable ssh-chat # ensures ssh-chat will start up after a reboot
$ sudo systemctl start ssh-chat # starts the ssh-chat daemon $ sudo systemctl start ssh-chat # starts the ssh-chat daemon