[Top][All Lists]

[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"
* The initialize and host-key options are removed.
* The -R flag has been added to dropbear.

Example service file:
(use-modules (gnu))
(use-service-modules base networking ssh)

  (host-name "test")
  (timezone "Europe/Zurich")
  (locale "en_US.UTF-8")

  (bootloader (grub-configuration (device "/dev/vda")))

  (file-systems (cons
      (device "/dev/vda1")
      (mount-point "/")
      (type "ext4"))

  (users (cons
      (name "test")
      (group "users")
      (supplementary-groups '("wheel"))
      (home-directory "/home/test")
      (password "sa5JEXtYx/rm6")) ;; password pass

  (packages %base-packages)

  (services (cons*
      #:port-number 22
      #:allow-empty-passwords? #t
      #:root-login? #t
      #:syslog-output? #t
      #:pid-file "/var/run/"
      #:password-authentication? #t)

Additional information:

This patch is needed, just adding -net user,hostfwd=tcp::10022-:22 at the end
didn't work for me.

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 
      " -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 
tested it with previous commits. I'm assuming that the problem is related to 
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/         |   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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]