You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to disable the SSH onion address in my Nix-Bitcoin setup, but it remains active despite setting nix-bitcoin.onionServices.sshd.enable = false;.
Even after rebuilding the system with nixos-rebuild switch, I can still see the SSH onion directory at /var/lib/tor/onion/sshd/, and Tor continues to serve SSH over the onion network.
Steps to Reproduce
Set the following in /etc/nixos/configuration.nix:
nix-bitcoin.onionServices.sshd.enable=false;services.tor.onionServices.sshd.enable=false;# is not working at all, gives me a build error after running nixos-rebuild switch
drwx------ 6 tor tor 4096 Feb 9 10:28 .
drwx------ 4 tor tor 4096 Feb 9 10:39 ..
drwx------ 3 tor tor 4096 Jan 31 20:22 bitcoind
drwx------ 3 tor tor 4096 Feb 2 22:34 electrs
drwx------ 3 tor tor 4096 Feb 3 20:38 mempool-frontend
drwx------ 3 tor tor 4096 Feb 9 10:28 sshd
Thanks for the report. The reason that nix-bitcoin.onionServices.sshd.enable = false; doesn't work is that the sshd onion service isn't enabled in that way in the first place. Instead, it is "manually" created in secure-node.nix via services.tor.relay.onionServices.sshd = nbLib.mkOnionService { port = 22; };.
services.tor.onionServices.sshd.enable = false; doesn't work because that option doesn't exist.
The way the tor module is written I don't see an easy way to disable the sshd module once it has been enabled via the secure-node.nix import. However, nix-bitcoin should support disabling the sshd onion service even when secure-node.nix is used.
While not permanently disabling the onion service, you can set it to an unused port via
Description
I am trying to disable the SSH onion address in my Nix-Bitcoin setup, but it remains active despite setting
nix-bitcoin.onionServices.sshd.enable = false;
.Even after rebuilding the system with
nixos-rebuild switch
, I can still see the SSH onion directory at/var/lib/tor/onion/sshd/
, and Tor continues to serve SSH over the onion network.Steps to Reproduce
/etc/nixos/configuration.nix
:sshd
exists.sudo systemctl restart tor.service journalctl -u tor.service -n 50 --no-pager | grep ssh
Observed Behavior
nixos-option nix-bitcoin.onionServices.sshd.enable
confirms that it is set tofalse
, but the service still exists.Expected Behavior
nix-bitcoin.onionServices.sshd.enable = false;
and rebuilding the system.Debugging Information
nixos-option nix-bitcoin.onionServices.sshd.enable
output:sudo ls -al /var/lib/tor/onion/
output:journalctl -u tor.service -n 50 --no-pager | grep ssh
output:System Information
24.11
0.0.118
0.4.8.13
nixos-rebuild
Possible Causes
secure-node.nix
might be overriding the SSH onion setting.services.tor.relay.onionServices.sshd
might still be enabled somewhere.Question
nix-bitcoin.onionServices.sshd.enable = false;
from being applied correctly?Thanks in advance for any guidance!
The text was updated successfully, but these errors were encountered: