Configuration
After installing a daemon from the list below using apt install [daemon] it will have created a config file called /etc/default/[daemon].conf. By editting this config file you can change the port the daemon uses. For some daemons additional configuration is needed in order for it to work. If a configuration is invalid, the daemon will not start.
Check the table for the options of each daemon. For the port= options, please note that that a valid port ranges between 1 and 65535 and must be unique for each daemon.
Daemon | Default port | Config file | Config file options (one per line) |
sshd | 22 | /etc/default/sshd.conf | port=123 |
maild | 25 | /etc/default/maild.conf | port=234 |
httpd | 443 | /etc/default/httpd.conf | port=345 |
btcminerd | 6641 | /etc/default/btcminerd.conf | port=456 |
btcsrvd | 1337 | /etc/default/btcsrvd.conf | port=567 |
NOTE: You need to restart a daemon for your config changes to take effect.