nix-on-droid icon indicating copy to clipboard operation
nix-on-droid copied to clipboard

Create SSH module

Open Pablo1107 opened this issue 1 year ago • 4 comments

Currently there is an article on the wiki stating how to manually set up an ssh daemon. Maybe this can be ported into a nix-on-droid module.

I may create a PR for this if you think this would be a nice-to-have.

Pablo1107 avatar Feb 07 '24 23:02 Pablo1107

See https://github.com/nix-community/nix-on-droid/pull/203

t184256 avatar Feb 07 '24 23:02 t184256

See #203

Seems that PR was abandoned by the original author. I'll try to take a look if I have a chance. Thank you!

Pablo1107 avatar Feb 08 '24 03:02 Pablo1107

Thanks to the wiki, i was able to successfully install an SSH server !

https://gitlab.com/pinage404/dotfiles/-/commit/405665aeb8d5468184375ad69767772eb06e971b#29ca4eb2dccce271cd9a3d588f9b50575ec5607c_0_2

pinage404 avatar Jul 13 '24 23:07 pinage404

Cool! I had to remove the option -D # don't detach into a daemon process because it would stay stuck on that step, and without it seems to get stuck when I run exit so I have to kill the app.

added your sshd-start to the startup files of bash and zsh with home-manager, and it works great

  # For starting the ssh server
  programs.zsh = {
    initExtra = ''
      sshd-start
    '';
  };
  programs.bash = {
    initExtra = ''
      sshd-start
    '';
  };

with your config i can connect to my phone from my PC through something like ssh [email protected] -p 8022

Yeshey avatar Aug 06 '24 16:08 Yeshey