mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-29 05:31:06 +01:00
Created SSH access (markdown)
parent
d48061ffe1
commit
f9907f359e
1 changed files with 19 additions and 0 deletions
19
SSH-access.md
Normal file
19
SSH-access.md
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
Lifted from https://github.com/t184256/nix-on-droid/issues/32#issuecomment-575930345:
|
||||
|
||||
> For now you can follow these steps to create a working sshd server:
|
||||
|
||||
> Install openssh via nix-env or nix-on-droid or what ever.
|
||||
> Create host key: ssh-keygen -t rsa -b 4096 -f ssh_host_rsa_key -N ""
|
||||
> Create sshd_config config file with following content:
|
||||
|
||||
> HostKey /absolute/path/to/ssh_host_rsa_key
|
||||
> Port 8022
|
||||
|
||||
> Create ~/.ssh/authorized_keys and add a public key
|
||||
> Run sshd with absolute path like: /data/data/com.termux.nix/files/home/.nix-profile/bin/sshd -f /path/to/sshd_config
|
||||
> Connect to your phone via ssh -p 8022 -l nix-on-droid -i /path/to/id_rsa <ip of phone>
|
||||
|
||||
> We will provide a module for the sshd config and service in the future to simplify the initial setup.
|
||||
|
||||
|
||||
Later on, https://github.com/t184256/nix-on-droid/issues/32 also suggests sourcing `~/.nix-profile/etc/profile.d/nix-on-droid-session-init.sh` from `~/.profile`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue