1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012-2022 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2015, 2016, 2018, 2019, 2020, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016, 2019 Leo Famulari <leo@famulari.name>
7 ;;; Copyright © 2016, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
8 ;;; Copyright © 2016 Christine Lemmer-Webber <cwebber@dustycloud.org>
9 ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
11 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
12 ;;; Copyright © 2017 Nikita <nikita@n0.is>
13 ;;; Copyright © 2018 Manuel Graf <graf@init.at>
14 ;;; Copyright © 2019 Gábor Boskovits <boskovits@gmail.com>
15 ;;; Copyright © 2019, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
16 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
17 ;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
18 ;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
19 ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
21 ;;; This file is part of GNU Guix.
23 ;;; GNU Guix is free software; you can redistribute it and/or modify it
24 ;;; under the terms of the GNU General Public License as published by
25 ;;; the Free Software Foundation; either version 3 of the License, or (at
26 ;;; your option) any later version.
28 ;;; GNU Guix is distributed in the hope that it will be useful, but
29 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
30 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 ;;; GNU General Public License for more details.
33 ;;; You should have received a copy of the GNU General Public License
34 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
36 (define-module (gnu packages ssh)
37 #:use-module (gnu packages)
38 #:use-module (gnu packages autotools)
39 #:use-module (gnu packages base)
40 #:use-module (gnu packages boost)
41 #:use-module (gnu packages compression)
42 #:use-module (gnu packages crypto)
43 #:use-module (gnu packages elf)
44 #:use-module (gnu packages gnupg)
45 #:use-module (gnu packages gperf)
46 #:use-module (gnu packages groff)
47 #:use-module (gnu packages guile)
48 #:use-module (gnu packages hurd)
49 #:use-module (gnu packages libedit)
50 #:use-module (gnu packages linux)
51 #:use-module (gnu packages logging)
52 #:use-module (gnu packages m4)
53 #:use-module (gnu packages multiprecision)
54 #:use-module (gnu packages ncurses)
55 #:use-module (gnu packages nettle)
56 #:use-module (gnu packages kerberos)
57 #:use-module (gnu packages perl)
58 #:use-module (gnu packages pkg-config)
59 #:use-module (gnu packages popt)
60 #:use-module (gnu packages protobuf)
61 #:use-module (gnu packages python)
62 #:use-module (gnu packages python-crypto)
63 #:use-module (gnu packages python-web)
64 #:use-module (gnu packages python-xyz)
65 #:use-module (gnu packages readline)
66 #:use-module (gnu packages security-token)
67 #:use-module (gnu packages texinfo)
68 #:use-module (gnu packages tls)
69 #:use-module (gnu packages xorg)
70 #:use-module (guix build-system cmake)
71 #:use-module (guix build-system gnu)
72 #:use-module (guix build-system python)
73 #:use-module (guix download)
74 #:use-module (guix git-download)
75 #:use-module ((guix licenses) #:prefix license:)
76 #:use-module (guix packages)
77 #:use-module (guix utils)
78 #:use-module (srfi srfi-1))
87 (url "https://github.com/six-ddc/hss")
88 (commit (string-append "v" version))))
89 (file-name (git-file-name name version))
92 "1rpysj65j9ls30bf2c5k5hykzzjfknrihs58imp178bx1wqzw4jl"))))
97 (list ,(string-append "CC=" (cc-for-target))
98 (string-append "INSTALL_BIN=" (assoc-ref %outputs "out") "/bin"))
99 #:tests? #f ; no tests
101 (modify-phases %standard-phases
102 (add-after 'unpack 'patch-file-names
103 (lambda* (#:key inputs outputs #:allow-other-keys)
104 (substitute* "Makefile"
105 (("/usr/local/opt/readline")
106 (assoc-ref inputs "readline")))
108 (delete 'configure)))) ; no configure script
109 (build-system gnu-build-system)
110 (home-page "https://github.com/six-ddc/hss/")
111 (synopsis "Interactive SSH client for multiple servers")
113 "@command{hss} is an interactive SSH client for multiple servers. Commands
114 are executed on all servers in parallel. Execution on one server does not need
115 to wait for that on another server to finish before starting. One can run a
116 command on hundreds of servers at the same time, with almost the same experience
117 as a local Bash shell.
121 @item interactive input: based on GNU readline.
122 @item history: responding to the @kbd{C-r} key.
123 @item auto-completion: @key{TAB}-completion from remote servers for commands and
126 (license license:expat)))
128 (define-public libssh
134 (uri (string-append "https://www.libssh.org/files/"
135 (version-major+minor version)
136 "/libssh-" version ".tar.xz"))
139 "16w2mc7pyv9mijjlgacbz8dgczc7ig2m6m70w1pld04vpn2zig46"))))
140 (build-system cmake-build-system)
141 (outputs '("out" "debug"))
143 '(#:configure-flags '("-DWITH_GCRYPT=ON")
145 ;; TODO: Add 'CMockery' and '-DWITH_TESTING=ON' for the test suite.
147 (inputs (list zlib libgcrypt mit-krb5))
148 (synopsis "SSH client library")
150 "libssh is a C library implementing the SSHv2 and SSHv1 protocol for client
151 and server implementations. With libssh, you can remotely execute programs,
152 transfer files, and use a secure and transparent tunnel for your remote
154 (home-page "https://www.libssh.org")
155 (license license:lgpl2.1+)))
157 (define-public libssh2
164 "https://www.libssh2.org/download/libssh2-"
168 "1zfsz9nldakfz61d2j70pk29zlmj7w2vv46s9l3x2prhcgaqpyym"))
169 (patches (search-patches "libssh2-CVE-2019-17498.patch"))))
170 (build-system gnu-build-system)
171 ;; The installed libssh2.pc file does not include paths to libgcrypt and
172 ;; zlib libraries, so we need to propagate the inputs.
173 (propagated-inputs (list libgcrypt zlib))
174 (arguments `(#:configure-flags `("--with-libgcrypt")))
175 (synopsis "Client-side C library implementing the SSH2 protocol")
177 "libssh2 is a library intended to allow software developers access to
178 the SSH-2 protocol in an easy-to-use self-contained package. It can be built
179 into an application to perform many different tasks when communicating with
180 a server that supports the SSH-2 protocol.")
181 (license license:bsd-3)
182 (home-page "https://www.libssh2.org/")))
184 (define-public openssh
190 (uri (string-append "mirror://openbsd/OpenSSH/portable/"
191 "openssh-" version ".tar.gz"))
192 (patches (search-patches "openssh-hurd.patch"
193 "openssh-trust-guix-store-directory.patch"))
196 "1ry5prcax0134v6srkgznpl9ch5snkgq7yvjqvd8c5mbnxa7cjgx"))))
197 (build-system gnu-build-system)
198 (native-inputs (list groff pkg-config))
199 (inputs `(("libedit" ,libedit)
204 ("libfido2" ,libfido2))) ;fails to build on GNU/Hurd
205 ("mit-krb5" ,mit-krb5)
207 ("xauth" ,xauth))) ; for 'ssh -X' and 'ssh -Y'
209 `(#:test-target "tests"
210 ;; Otherwise, the test scripts try to use a nonexistent directory and
212 #:make-flags '("REGRESSTMP=\"$${BUILDDIR}/regress\"")
213 #:configure-flags `("--sysconfdir=/etc/ssh"
215 ;; Default value of 'PATH' used by sshd.
216 "--with-default-path=/run/current-system/profile/bin"
218 ;; configure needs to find krb5-config.
219 ,(string-append "--with-kerberos5="
220 (assoc-ref %build-inputs "mit-krb5")
223 ;; libedit is needed for sftp completion.
226 ;; Enable PAM support in sshd.
227 ,,@(if (hurd-target?)
231 ;; Support creation and use of ecdsa-sk,
233 "--with-security-key-builtin"))
237 ;; "make install" runs "install -s" by default,
238 ;; which doesn't work for cross-compiled binaries
239 ;; because it invokes 'strip' instead of
240 ;; 'TRIPLET-strip'. Work around this.
241 ,,@(if (%current-target-system)
246 (modify-phases %standard-phases
247 (add-after 'configure 'reset-/var/empty
248 (lambda* (#:key outputs #:allow-other-keys)
249 (let ((out (assoc-ref outputs "out")))
250 (substitute* "Makefile"
251 (("PRIVSEP_PATH=/var/empty")
252 (string-append "PRIVSEP_PATH=" out "/var/empty"))))))
253 (add-after 'configure 'set-store-location
255 (substitute* "misc.c"
256 (("@STORE_DIRECTORY@")
257 (string-append "\"" (%store-directory) "\"")))))
258 (add-before 'check 'patch-tests
260 (substitute* "regress/test-exec.sh"
261 (("/bin/sh") (which "sh")))
263 ;; Remove 't-exec' regress target which requires user 'sshd'.
264 (substitute* (list "Makefile"
266 (("^(tests:.*) t-exec(.*)" all pre post)
267 (string-append pre post)))))
269 (lambda* (#:key outputs (make-flags '()) #:allow-other-keys)
270 (let ((out (assoc-ref outputs "out")))
271 ;; Install without host keys and system configuration files.
272 ;; This will install /var/empty to the store, which is needed
273 ;; by the system openssh-service-type.
274 (apply invoke "make" "install-nosysconf" make-flags)
275 (with-directory-excursion "contrib"
276 (chmod "ssh-copy-id" #o555)
277 (install-file "ssh-copy-id"
278 (string-append out "/bin/"))
279 (install-file "ssh-copy-id.1"
280 (string-append out "/share/man/man1/")))))))))
281 (synopsis "Client and server for the secure shell (ssh) protocol")
283 "The SSH2 protocol implemented in OpenSSH is standardised by the
284 IETF secsh working group and is specified in several RFCs and drafts.
285 It is composed of three layered components:
287 The transport layer provides algorithm negotiation and a key exchange.
288 The key exchange includes server authentication and results in a
289 cryptographically secured connection: it provides integrity, confidentiality
290 and optional compression.
292 The user authentication layer uses the established connection and relies on
293 the services provided by the transport layer. It provides several mechanisms
294 for user authentication. These include traditional password authentication
295 as well as public-key or host-based authentication mechanisms.
297 The connection layer multiplexes many different concurrent channels over the
298 authenticated connection and allows tunneling of login sessions and
299 TCP-forwarding. It provides a flow control service for these channels.
300 Additionally, various channel-specific options can be negotiated.")
301 (license (license:non-copyleft "file://LICENSE"
302 "See LICENSE in the distribution."))
304 '((release-monitoring-url . "https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/")))
305 (home-page "https://www.openssh.com/")))
307 ;; OpenSSH without X support. This allows to use OpenSSH without dragging X
308 ;; libraries to the closure.
309 (define-public openssh-sans-x
312 (name "openssh-sans-x")
313 (inputs (alist-delete "xauth" (package-inputs openssh)))
314 (synopsis "OpenSSH client and server without X11 support")))
316 (define-public guile-ssh
320 (home-page "https://github.com/artyom-poptsov/guile-ssh")
325 (commit (string-append "v" version))))
326 (file-name (git-file-name name version))
329 "0zzn5hsf97b35gixyg4z14sspl15qwnp52y4h89wra4y31l7467q"))))
330 (build-system gnu-build-system)
331 (outputs '("out" "debug"))
333 `(;; It makes no sense to build libguile-ssh.a.
334 #:configure-flags '("--disable-static")
336 #:phases (modify-phases %standard-phases
337 (add-before 'bootstrap 'support-cross-compilation
339 ;; Support cross-compilation:
340 ;; <https://github.com/artyom-poptsov/guile-ssh/issues/30>.
341 (substitute* "libguile-ssh/Makefile.am"
342 (("\\$\\(guile_snarf\\)")
343 "CPP=\"$(CPP)\" $(guile_snarf)"))))
344 (add-before 'build 'fix-libguile-ssh-file-name
345 (lambda* (#:key outputs #:allow-other-keys)
346 ;; Build and install libguile-ssh.so so that we can use
347 ;; its absolute file name in .scm files, before we build
349 (let* ((out (assoc-ref outputs "out"))
350 (lib (string-append out "/lib")))
351 (invoke "make" "install"
354 (parallel-job-count)))
355 (substitute* (find-files "." "\\.scm$")
356 (("\"libguile-ssh\"")
357 (string-append "\"" lib "/libguile-ssh\"")))
359 ,@(if (%current-target-system)
361 '((add-before 'check 'fix-guile-path
362 (lambda* (#:key inputs #:allow-other-keys)
363 (let ((guile (assoc-ref inputs "guile")))
364 (substitute* "tests/common.scm"
366 (string-append guile "/bin/guile")))
368 (add-after 'install 'remove-bin-directory
369 (lambda* (#:key outputs #:allow-other-keys)
370 (let* ((out (assoc-ref outputs "out"))
371 (bin (string-append out "/bin"))
372 (examples (string-append
373 out "/share/guile-ssh/examples")))
375 (rename-file (string-append bin "/ssshd.scm")
376 (string-append examples "/ssshd.scm"))
377 (rename-file (string-append bin "/sssh.scm")
378 (string-append examples "/sssh.scm"))
379 (delete-file-recursively bin)
381 (native-inputs (list autoconf
387 guile-3.0)) ;needed when cross-compiling.
388 (inputs (list guile-3.0 libssh libgcrypt))
389 (synopsis "Guile bindings to libssh")
391 "Guile-SSH is a library that provides access to the SSH protocol for
392 programs written in GNU Guile interpreter. It is a wrapper to the underlying
394 (license license:gpl3+)))
396 (define-public guile2.2-ssh
399 (name "guile2.2-ssh")
401 (modify-inputs (package-native-inputs guile-ssh)
403 (prepend guile-2.2 ;needed when cross-compiling.
405 (inputs (modify-inputs (package-inputs guile-ssh)
406 (replace "guile" guile-2.2)))))
408 (define-public corkscrew
409 ;; The last 2.0 release hails from 2009. Use a fork (submitted upstream as
410 ;; <https://github.com/patpadgett/corkscrew/pull/5>) that adds now-essential
411 ;; IPv6 and TLS support.
413 (commit "268b71e88ee51fddceab96d665b327394f1feb12"))
416 (version (git-version "2.0" revision commit))
421 (url "https://github.com/rtgill82/corkscrew")
424 (base32 "1rylbimlfig3ii4bqr4r058lkc43pqkxnxqpqdpm31blh3xs0dcw"))
425 (file-name (git-file-name name version))))
426 (build-system gnu-build-system)
429 (list "--enable-ssl")
431 (modify-phases %standard-phases
432 (add-after 'unpack 'update-metadata
434 (substitute* "configure.ac"
435 ;; Our version differs significantly.
436 (("2.0") (string-append ,version " (Guix)")))
437 (substitute* "corkscrew.c"
438 ;; This domain's since been squat.
439 (("\\(agroman@agroman\\.net\\)")
440 (format #f "<~a>" ,(package-home-page this-package))))))
441 (add-after 'install 'install-documentation
442 (lambda* (#:key outputs #:allow-other-keys)
443 (let* ((out (assoc-ref outputs "out"))
444 (doc (string-append out "/share/doc/" ,name "-" ,version)))
445 (install-file "README.md" doc)
448 (list autoconf automake pkg-config))
451 (home-page "https://github.com/patpadgett/corkscrew")
452 (synopsis "SSH tunneling through HTTP(S) proxies")
454 "Corkscrew tunnels SSH connections through most HTTP and HTTPS proxies.
455 It supports proxy authentication through the HTTP basic authentication scheme
456 with optional @acronym{TLS, Transport-Level Security} to protect credentials.")
457 (license license:gpl2+))))
465 (uri (string-append "https://mosh.org/mosh-" version ".tar.gz"))
468 "05hjhlp6lk8yjcy59zywpf0r6s0h0b9zxq0lw66dh9x8vxrhaq6s"))))
469 (build-system gnu-build-system)
472 (modify-phases %standard-phases
473 (add-after 'unpack 'patch-FHS-file-names
475 (substitute* "scripts/mosh.pl"
479 (add-after 'install 'wrap
480 (lambda* (#:key outputs #:allow-other-keys)
481 ;; Make sure 'mosh' can find 'mosh-client' and
483 (let* ((out (assoc-ref outputs "out"))
484 (bin (string-append out "/bin")))
485 (wrap-program (string-append bin "/mosh")
486 `("PATH" ":" prefix (,bin)))))))))
490 `(("openssl" ,openssl)
492 ("perl-io-tty" ,perl-io-tty)
495 ("protobuf" ,protobuf)
496 ("boost-headers" ,boost)))
497 (home-page "https://mosh.org/")
498 (synopsis "Remote shell tolerant to intermittent connectivity")
500 "Mosh is a remote terminal application that allows client roaming, supports
501 intermittent connectivity, and provides intelligent local echo and line editing
502 of user keystrokes. It's a replacement for SSH that's more robust and
503 responsive, especially over Wi-Fi, cellular, and long-distance links.")
504 (license license:gpl3+)))
506 (define-public dropbear
514 "https://matt.ucc.asn.au/dropbear/releases/"
515 "dropbear-" version ".tar.bz2"))
517 (base32 "0fy5ma4cfc2pk25mcccc67b2mf1rnb2c06ilb7ddnxbpnc85s8s8"))
518 (modules '((guix build utils)))
521 (delete-file-recursively "libtommath")
522 (delete-file-recursively "libtomcrypt")
523 (substitute* "configure"
524 (("-ltomcrypt") "-ltomcrypt -ltommath"))
526 (build-system gnu-build-system)
528 `(#:configure-flags '("--disable-bundled-libtom")
529 #:tests? #f)) ; there is no "make check" or anything similar
531 (list libtomcrypt libtommath zlib))
532 (synopsis "Small SSH server and client")
533 (description "Dropbear is a relatively small SSH server and
534 client. It runs on a variety of POSIX-based platforms. Dropbear is
535 particularly useful for embedded systems, such as wireless routers.")
536 (home-page "https://matt.ucc.asn.au/dropbear/dropbear.html")
537 (license (license:x11-style "" "See file LICENSE."))))
539 (define-public liboop
546 (uri (string-append "http://ftp.lysator.liu.se/pub/liboop/"
547 name "-" version ".tar.gz"))
550 "1q0p1l72pq9k3bi7a366j2rishv7dzzkg3i6r2npsfg7cnnidbsn"))))
551 (build-system gnu-build-system)
552 (home-page "https://www.lysator.liu.se/liboop/")
553 (synopsis "Event loop library")
554 (description "Liboop is a low-level event loop management library for
555 POSIX-based operating systems. It supports the development of modular,
556 multiplexed applications which may respond to events from several sources. It
557 replaces the \"select() loop\" and allows the registration of event handlers
558 for file and network I/O, timers and signals. Since processes use these
559 mechanisms for almost all external communication, liboop can be used as the
560 basis for almost any application.")
561 (license license:lgpl2.1+)))
569 (uri (string-append "mirror://gnu/lsh/lsh-"
573 "1qqjy9zfzgny0rkb27c8c7dfsylvb6n0ld8h3an2r83pmaqr9gwb"))
574 (modules '((guix build utils)))
577 (substitute* "src/testsuite/functions.sh"
579 ;; Avoid host name lookups since they don't work in
583 ;; Make tests more verbose.
586 (substitute* (find-files "src/testsuite" "-test$")
587 (("localhost") "127.0.0.1"))
589 (substitute* "src/testsuite/login-auth-test"
590 (("/bin/cat") "cat"))))
591 (patches (search-patches "lsh-fix-x11-forwarding.patch"))))
592 (build-system gnu-build-system)
599 psmisc)) ; for `killall'
603 ;; 'rl.c' uses the 'CPPFunction' type, which is no longer in
609 ;; The server (lshd) invokes xauth when X11 forwarding is requested.
610 ;; This adds 24 MiB (or 27%) to the closure of lsh.
612 libxau)) ;also required for x11-forwarding
614 '(;; Skip the `configure' test that checks whether /dev/ptmx &
615 ;; co. work as expected, because it relies on impurities (for
616 ;; instance, /dev/pts may be unavailable in chroots.)
617 #:configure-flags '("lsh_cv_sys_unix98_ptys=yes"
619 ;; Use glibc's argp rather than the bundled one.
622 ;; 'lsh_argp.h' checks HAVE_ARGP_PARSE but nothing
624 "CPPFLAGS=-DHAVE_ARGP_PARSE"
626 ;; Fix the build of lsh@2.1 with GCC 10.
627 "CFLAGS=-O2 -g -fcommon")
629 (modify-phases %standard-phases
630 (add-after 'unpack 'disable-failing-tests
632 ;; FIXME: Most tests won't run in a chroot, presumably because
633 ;; /etc/profile is missing, and thus clients get an empty $PATH
634 ;; and nothing works. Run only the subset that passes.
635 (delete-file "configure") ;force rebootstrap
636 (substitute* "src/testsuite/Makefile.am"
637 (("seed-test \\\\") ;prevent trailing slash
639 (("^\t(lsh|daemon|tcpip|socks|lshg|lcp|rapid7|lshd).*test.*")
641 (add-before 'configure 'pre-configure
642 (lambda* (#:key inputs #:allow-other-keys)
643 (let* ((nettle (assoc-ref inputs "nettle"))
644 (sexp-conv (string-append nettle "/bin/sexp-conv")))
645 ;; Remove argp from the list of sub-directories; we don't want
646 ;; to build it, really.
647 (substitute* "src/Makefile.in"
651 ;; Make sure 'lsh' and 'lshd' pick 'sexp-conv' in the right place
653 (substitute* "src/environ.h.in"
654 (("^#define PATH_SEXP_CONV.*")
655 (string-append "#define PATH_SEXP_CONV \""
658 ;; Same for the 'lsh-authorize' script.
659 (substitute* "src/lsh-authorize"
661 (string-append "=" sexp-conv)))
663 ;; Tell lshd where 'xauth' lives. Another option would be to
664 ;; hardcode "/run/current-system/profile/bin/xauth", thereby
665 ;; reducing the closure size, but that wouldn't work on foreign
667 (with-fluids ((%default-port-encoding "ISO-8859-1"))
668 (substitute* "src/server_x11.c"
669 (("define XAUTH_PROGRAM.*")
670 (string-append "define XAUTH_PROGRAM \""
671 (assoc-ref inputs "xauth")
672 "/bin/xauth\"\n")))))
674 ;; Tests rely on $USER being set.
675 (setenv "USER" "guix"))))))
676 (home-page "https://www.lysator.liu.se/~nisse/lsh/")
677 (synopsis "GNU implementation of the Secure Shell (ssh) protocols")
679 "GNU lsh is a free implementation of the SSH version 2 protocol. It is
680 used to create a secure line of communication between two computers,
681 providing shell access to the server system from the client. It provides
682 both the server daemon and the client application, as well as tools for
683 manipulating key files.")
684 (license license:gpl2+)))
686 (define-public sshpass
693 (uri (string-append "mirror://sourceforge/sshpass/sshpass/"
694 version "/sshpass-" version ".tar.gz"))
696 (base32 "1dwzqknpswa8vjlbwsx9rcq1j2a7px9h9i2anh09pzkz0mg6wx3i"))))
697 (build-system gnu-build-system)
698 (home-page "https://sourceforge.net/projects/sshpass/")
699 (synopsis "Non-interactive password authentication with SSH")
700 (description "sshpass is a tool for non-interactively performing password
701 authentication with SSH's so-called @dfn{interactive keyboard password
703 (license license:gpl2+)))
705 (define-public autossh
713 "https://www.harding.motd.ca/autossh/autossh-"
716 (base32 "0xqjw8df68f4kzkns5gcah61s5wk0m44qdk2z1d6388w6viwxhsz"))))
717 (build-system gnu-build-system)
718 (arguments `(#:tests? #f)) ; There is no "make check" or anything similar
719 (inputs (list openssh))
720 (synopsis "Automatically restart SSH sessions and tunnels")
721 (description "autossh is a program to start a copy of @command{ssh} and
722 monitor it, restarting it as necessary should it die or stop passing traffic.")
723 (home-page "https://www.harding.motd.ca/autossh/")
725 ;; Why point to a source file? Well, all the individual files have a
726 ;; copy of this license in their headers, but there's no separate file
727 ;; with that information.
728 (license:non-copyleft "file://autossh.c"))))
737 (uri (string-append "https://github.com/chaos/pdsh/"
738 "releases/download/pdsh-" version
739 "/pdsh-" version ".tar.gz"))
741 (base32 "1s91hmhrz7rfb6h3l5k97s393rcm1ww3svp8dx5z8vkkc933wyxl"))))
742 (build-system gnu-build-system)
747 (modify-phases %standard-phases
748 (add-after 'unpack 'patch-/bin/sh
750 (substitute* '("tests/t0006-pdcp.sh"
751 "tests/t0004-module-loading.sh"
753 "tests/t1003-slurm.sh"
754 "tests/t6036-long-output-lines.sh"
755 "tests/aggregate-results.sh"
756 "tests/t2000-exec.sh"
757 "tests/t0002-internal.sh"
758 "tests/t1002-dshgroup.sh"
759 "tests/t5000-dshbak.sh"
760 "tests/t0001-basic.sh"
761 "tests/t0005-rcmd_type-and-user.sh"
763 "tests/t2002-mrsh.sh"
764 "tests/t0003-wcoll.sh"
765 "tests/test-modules/pcptest.c")
766 (("/bin/sh") (which "bash")))
768 (add-after 'unpack 'patch-tests
770 (substitute* "tests/t6036-long-output-lines.sh"
771 (("which") (which "which")))
774 (list openssh mit-krb5 perl))
777 (home-page "https://github.com/chaos/pdsh")
778 (synopsis "Parallel distributed shell")
779 (description "Pdsh is a an efficient, multithreaded remote shell client
780 which executes commands on multiple remote hosts in parallel. Pdsh implements
781 dynamically loadable modules for extended functionality such as new remote
782 shell services and remote host selection.")
783 (license license:gpl2+)))
785 (define-public python-asyncssh
787 (name "python-asyncssh")
792 (uri (pypi-uri "asyncssh" version))
795 "0lnhh2h1mj79j66ni883s9f3xldnbjb10vh80g24b7m003mm524c"))))
796 (build-system python-build-system)
798 (list python-cryptography python-pyopenssl python-gssapi
801 (list openssh openssl))
804 (modify-phases %standard-phases
805 (add-after 'unpack 'disable-tests
807 (substitute* "tests/test_agent.py"
808 ;; TODO Test fails for unknown reason
809 (("(.+)async def test_confirm" all indent)
810 (string-append indent "@unittest.skip('disabled by guix')\n"
811 indent "async def test_confirm")))
813 (home-page "https://asyncssh.readthedocs.io/")
814 (synopsis "Asynchronous SSHv2 client and server library for Python")
816 "AsyncSSH is a Python package which provides an asynchronous client and
817 server implementation of the SSHv2 protocol on top of the Python 3.6+ asyncio
819 (license license:epl2.0)))
821 (define-public clustershell
823 (name "clustershell")
829 (url "https://github.com/cea-hpc/clustershell")
830 (commit (string-append "v" version))))
831 (file-name (git-file-name name version))
833 (base32 "11b87vyamcw4rvgxz74jxwkr9ly0h9ldp2wqsi5wc19p0r06la5j"))))
834 (build-system python-build-system)
835 (inputs (list openssh))
836 (propagated-inputs (list python-pyyaml))
838 `(#:phases (modify-phases %standard-phases
839 (add-before 'build 'record-openssh-file-name
840 (lambda* (#:key inputs #:allow-other-keys)
841 (let ((ssh (assoc-ref inputs "openssh")))
842 (substitute* "lib/ClusterShell/Worker/Ssh.py"
843 (("info\\(\"ssh_path\"\\) or \"ssh\"")
844 (string-append "info(\"ssh_path\") or \""
845 ssh "/bin/ssh\"")))))))))
846 (home-page "https://cea-hpc.github.io/clustershell/")
847 (synopsis "Scalable event-driven Python framework for cluster administration")
849 "ClusterShell is an event-driven Python framework, designed to run local
850 or distant commands in parallel on server farms or on large GNU/Linux
851 clusters. It will take care of common issues encountered on HPC clusters,
852 such as operating on groups of nodes, running distributed commands using
853 optimized execution algorithms, as well as gathering results and merging
854 identical outputs, or retrieving return codes. ClusterShell takes advantage
855 of existing remote shell facilities such as SSH.")
856 (license license:lgpl2.1+)))
858 (define-public endlessh
866 (url "https://github.com/skeeto/endlessh")
868 (file-name (git-file-name name version))
870 (base32 "0ziwr8j1frsp3dajr8h5glkm1dn5cci404kazz5w1jfrp0736x68"))))
871 (build-system gnu-build-system)
873 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
874 ,(string-append "CC=" (cc-for-target)))
875 #:tests? #f ; no test target
877 (modify-phases %standard-phases
878 (delete 'configure)))) ; no configure script
879 (home-page "https://github.com/skeeto/endlessh")
880 (synopsis "SSH tarpit that slowly sends an endless banner")
882 "Endlessh is an SSH tarpit that very slowly sends an endless, random SSH
883 banner. It keeps SSH clients locked up for hours or even days at a time. The
884 purpose is to put your real SSH server on another port and then let the script
885 kiddies get stuck in this tarpit instead of bothering a real server.
887 Since the tarpit is in the banner before any cryptographic exchange occurs, this
888 program doesn't depend on any cryptographic libraries. It's a simple,
889 single-threaded, standalone C program. It uses @code{poll()} to trap multiple
891 (license license:unlicense)))
893 (define-public webssh
900 (url "https://github.com/huashengdun/webssh")
901 (commit (string-append "v" version))))
902 (file-name (git-file-name name version))
905 "1bcy9flrzbvams5p77swwiygv54ac58ia7hpic1bvg30b3wpvv7b"))))
906 (build-system python-build-system)
908 (list python-paramiko python-tornado))
909 (home-page "https://webssh.huashengdun.org/")
910 (synopsis "Web application to be used as an SSH client")
911 (description "This package provides a web application to be used as an SSH
916 @item SSH password authentication supported, including empty password.
917 @item SSH public-key authentication supported, including DSA RSA ECDSA
919 @item Encrypted keys supported.
920 @item Two-Factor Authentication (time-based one-time password) supported.
921 @item Fullscreen terminal supported.
922 @item Terminal window resizable.
923 @item Auto detect the ssh server's default encoding.
924 @item Modern browsers are supported.
926 (license license:expat)))