[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 0/2] Dropbear service take two.
From: |
David Craven |
Subject: |
[PATCH 0/2] Dropbear service take two. |
Date: |
Wed, 13 Jul 2016 18:13:10 +0200 |
Changes from previous version:
* Service initialization is reduced to just creating the "/etc/dropbear"
directory.
* The initialize and host-key options are removed.
* The -R flag has been added to dropbear.
Example service file:
```scheme
(use-modules (gnu))
(use-service-modules base networking ssh)
(operating-system
(host-name "test")
(timezone "Europe/Zurich")
(locale "en_US.UTF-8")
(bootloader (grub-configuration (device "/dev/vda")))
(file-systems (cons
(file-system
(device "/dev/vda1")
(mount-point "/")
(type "ext4"))
%base-file-systems))
(users (cons
(user-account
(name "test")
(group "users")
(supplementary-groups '("wheel"))
(home-directory "/home/test")
(password "sa5JEXtYx/rm6")) ;; password pass
%base-user-accounts))
(packages %base-packages)
(services (cons*
(dhcp-client-service)
(dropbear-service
#:port-number 22
#:allow-empty-passwords? #t
#:root-login? #t
#:syslog-output? #t
#:pid-file "/var/run/dropbear.pid"
#:password-authentication? #t)
(rngd-service)
%base-services)))
```
Additional information:
This patch is needed, just adding -net user,hostfwd=tcp::10022-:22 at the end
didn't work for me.
```diff
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index 676e89d..68aab5d 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -468,7 +468,7 @@ with '-virtfs' options for the host file systems listed in
SHARED-FS."
"")
" -no-reboot -net nic,model=virtio \
" #$@(map virtfs-option shared-fs) " \
- -net user \
+ -net user,hostfwd=tcp::10022-:22 \
-vga std \
-drive file=" #$image
",if=virtio,cache=writeback,werror=report,readonly \
```
You can use this command to connect to dropbear:
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no address@hidden
-p 10022
I'm currently having an issue with all guix operations after commit 4ee96a7 but
I
tested it with previous commits. I'm assuming that the problem is related to
nixos
and that it shouldn't affect people using guixsd.
David Craven (2):
gnu: lsh: Move to (gnu packages ssh)
services: Add 'dropbear-service'.
doc/guix.texi | 18 +++++-
gnu/local.mk | 1 -
gnu/packages/lsh.scm | 159 ---------------------------------------------------
gnu/packages/ssh.scm | 158 ++++++++++++++++++++++++++++++++++++++++++++++----
gnu/services/ssh.scm | 83 +++++++++++++++++++++++++--
5 files changed, 242 insertions(+), 177 deletions(-)
delete mode 100644 gnu/packages/lsh.scm
--
2.9.0
- [PATCH 0/2] Dropbear service take two.,
David Craven <=