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, 2022 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 admin)
39 #:use-module (gnu packages autotools)
40 #:use-module (gnu packages base)
41 #:use-module (gnu packages boost)
42 #:use-module (gnu packages check)
43 #:use-module (gnu packages compression)
44 #:use-module (gnu packages crypto)
45 #:use-module (gnu packages elf)
46 #:use-module (gnu packages gnupg)
47 #:use-module (gnu packages gperf)
48 #:use-module (gnu packages groff)
49 #:use-module (gnu packages guile)
50 #:use-module (gnu packages hurd)
51 #:use-module (gnu packages libedit)
52 #:use-module (gnu packages linux)
53 #:use-module (gnu packages logging)
54 #:use-module (gnu packages m4)
55 #:use-module (gnu packages multiprecision)
56 #:use-module (gnu packages ncurses)
57 #:use-module (gnu packages nettle)
58 #:use-module (gnu packages kerberos)
59 #:use-module (gnu packages perl)
60 #:use-module (gnu packages pkg-config)
61 #:use-module (gnu packages popt)
62 #:use-module (gnu packages protobuf)
63 #:use-module (gnu packages python)
64 #:use-module (gnu packages python-crypto)
65 #:use-module (gnu packages python-web)
66 #:use-module (gnu packages python-xyz)
67 #:use-module (gnu packages readline)
68 #:use-module (gnu packages security-token)
69 #:use-module (gnu packages texinfo)
70 #:use-module (gnu packages tls)
71 #:use-module (gnu packages xorg)
72 #:use-module (guix build-system cmake)
73 #:use-module (guix build-system gnu)
74 #:use-module (guix build-system python)
75 #:use-module (guix download)
76 #:use-module (guix git-download)
77 #:use-module (guix gexp)
78 #:use-module ((guix licenses) #:prefix license:)
79 #:use-module (guix packages)
80 #:use-module (guix utils)
81 #:use-module (srfi srfi-1))
90 (url "https://github.com/six-ddc/hss")
92 (file-name (git-file-name name version))
95 "12578xhvkg70ma411yh8nbpcpnys420bnm9g0dzypb0vn3jxpz8q"))))
100 #~(list (string-append "CC=" #$(cc-for-target))
101 (string-append "INSTALL_BIN=" #$output "/bin"))
102 #:tests? #f ; no tests
104 #~(modify-phases %standard-phases
105 (add-after 'unpack 'patch-file-names
107 (substitute* "Makefile"
108 (("/usr/local/opt/readline")
109 #$(this-package-input "readline")))))
110 (delete 'configure)))) ; no configure script
111 (build-system gnu-build-system)
112 (home-page "https://github.com/six-ddc/hss/")
113 (synopsis "Interactive SSH client for multiple servers")
115 "@command{hss} is an interactive SSH client for multiple servers. Commands
116 are executed on all servers in parallel. Execution on one server does not need
117 to wait for that on another server to finish before starting. One can run a
118 command on hundreds of servers at the same time, with almost the same experience
119 as a local Bash shell.
123 @item interactive input: based on GNU readline.
124 @item history: responding to the @kbd{C-r} key.
125 @item auto-completion: @key{TAB}-completion from remote servers for commands and
128 (license license:expat)))
130 (define-public libssh
136 (uri (string-append "https://www.libssh.org/files/"
137 (version-major+minor version)
138 "/libssh-" version ".tar.xz"))
141 "16w2mc7pyv9mijjlgacbz8dgczc7ig2m6m70w1pld04vpn2zig46"))))
142 (build-system cmake-build-system)
143 (outputs '("out" "debug"))
145 '(#:configure-flags '("-DWITH_GCRYPT=ON")
147 ;; TODO: Add 'CMockery' and '-DWITH_TESTING=ON' for the test suite.
149 (inputs (list zlib libgcrypt mit-krb5))
150 (synopsis "SSH client library")
152 "libssh is a C library implementing the SSHv2 and SSHv1 protocol for client
153 and server implementations. With libssh, you can remotely execute programs,
154 transfer files, and use a secure and transparent tunnel for your remote
156 (home-page "https://www.libssh.org")
157 (license license:lgpl2.1+)))
159 (define-public libssh2
166 "https://www.libssh2.org/download/libssh2-"
170 "1zfsz9nldakfz61d2j70pk29zlmj7w2vv46s9l3x2prhcgaqpyym"))
171 (patches (search-patches "libssh2-CVE-2019-17498.patch"))))
172 (build-system gnu-build-system)
173 ;; The installed libssh2.pc file does not include paths to libgcrypt and
174 ;; zlib libraries, so we need to propagate the inputs.
175 (propagated-inputs (list libgcrypt zlib))
176 (arguments `(#:configure-flags `("--with-libgcrypt")))
177 (synopsis "Client-side C library implementing the SSH2 protocol")
179 "libssh2 is a library intended to allow software developers access to
180 the SSH-2 protocol in an easy-to-use self-contained package. It can be built
181 into an application to perform many different tasks when communicating with
182 a server that supports the SSH-2 protocol.")
183 (license license:bsd-3)
184 (home-page "https://www.libssh2.org/")))
186 (define-public openssh
192 (uri (string-append "mirror://openbsd/OpenSSH/portable/"
193 "openssh-" version ".tar.gz"))
194 (patches (search-patches "openssh-hurd.patch"
195 "openssh-trust-guix-store-directory.patch"))
198 "1ry5prcax0134v6srkgznpl9ch5snkgq7yvjqvd8c5mbnxa7cjgx"))))
199 (build-system gnu-build-system)
200 (native-inputs (list groff pkg-config))
201 (inputs `(("libedit" ,libedit)
206 ("libfido2" ,libfido2))) ;fails to build on GNU/Hurd
207 ("mit-krb5" ,mit-krb5)
209 ("xauth" ,xauth))) ; for 'ssh -X' and 'ssh -Y'
211 `(#:test-target "tests"
212 ;; Otherwise, the test scripts try to use a nonexistent directory and
214 #:make-flags '("REGRESSTMP=\"$${BUILDDIR}/regress\"")
215 #:configure-flags `("--sysconfdir=/etc/ssh"
217 ;; Default value of 'PATH' used by sshd.
218 "--with-default-path=/run/current-system/profile/bin"
220 ;; configure needs to find krb5-config.
221 ,(string-append "--with-kerberos5="
222 (assoc-ref %build-inputs "mit-krb5")
225 ;; libedit is needed for sftp completion.
228 ;; Enable PAM support in sshd.
229 ,,@(if (hurd-target?)
233 ;; Support creation and use of ecdsa-sk,
235 "--with-security-key-builtin"))
239 ;; "make install" runs "install -s" by default,
240 ;; which doesn't work for cross-compiled binaries
241 ;; because it invokes 'strip' instead of
242 ;; 'TRIPLET-strip'. Work around this.
243 ,,@(if (%current-target-system)
248 (modify-phases %standard-phases
249 (add-after 'configure 'reset-/var/empty
250 (lambda* (#:key outputs #:allow-other-keys)
251 (let ((out (assoc-ref outputs "out")))
252 (substitute* "Makefile"
253 (("PRIVSEP_PATH=/var/empty")
254 (string-append "PRIVSEP_PATH=" out "/var/empty"))))))
255 (add-after 'configure 'set-store-location
257 (substitute* "misc.c"
258 (("@STORE_DIRECTORY@")
259 (string-append "\"" (%store-directory) "\"")))))
260 (add-before 'check 'patch-tests
262 (substitute* "regress/test-exec.sh"
263 (("/bin/sh") (which "sh")))
265 ;; Remove 't-exec' regress target which requires user 'sshd'.
266 (substitute* (list "Makefile"
268 (("^(tests:.*) t-exec(.*)" all pre post)
269 (string-append pre post)))))
271 (lambda* (#:key outputs (make-flags '()) #:allow-other-keys)
272 (let ((out (assoc-ref outputs "out")))
273 ;; Install without host keys and system configuration files.
274 ;; This will install /var/empty to the store, which is needed
275 ;; by the system openssh-service-type.
276 (apply invoke "make" "install-nosysconf" make-flags)
277 (with-directory-excursion "contrib"
278 (chmod "ssh-copy-id" #o555)
279 (install-file "ssh-copy-id"
280 (string-append out "/bin/"))
281 (install-file "ssh-copy-id.1"
282 (string-append out "/share/man/man1/")))))))))
283 (synopsis "Client and server for the secure shell (ssh) protocol")
285 "The SSH2 protocol implemented in OpenSSH is standardised by the
286 IETF secsh working group and is specified in several RFCs and drafts.
287 It is composed of three layered components:
289 The transport layer provides algorithm negotiation and a key exchange.
290 The key exchange includes server authentication and results in a
291 cryptographically secured connection: it provides integrity, confidentiality
292 and optional compression.
294 The user authentication layer uses the established connection and relies on
295 the services provided by the transport layer. It provides several mechanisms
296 for user authentication. These include traditional password authentication
297 as well as public-key or host-based authentication mechanisms.
299 The connection layer multiplexes many different concurrent channels over the
300 authenticated connection and allows tunneling of login sessions and
301 TCP-forwarding. It provides a flow control service for these channels.
302 Additionally, various channel-specific options can be negotiated.")
303 (license (license:non-copyleft "file://LICENSE"
304 "See LICENSE in the distribution."))
306 '((release-monitoring-url . "https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/")))
307 (home-page "https://www.openssh.com/")))
309 ;; OpenSSH without X support. This allows to use OpenSSH without dragging X
310 ;; libraries to the closure.
311 (define-public openssh-sans-x
314 (name "openssh-sans-x")
315 (inputs (alist-delete "xauth" (package-inputs openssh)))
316 (synopsis "OpenSSH client and server without X11 support")))
318 (define-public guile-ssh
322 (home-page "https://github.com/artyom-poptsov/guile-ssh")
327 (commit (string-append "v" version))))
328 (file-name (git-file-name name version))
331 "0zzn5hsf97b35gixyg4z14sspl15qwnp52y4h89wra4y31l7467q"))))
332 (build-system gnu-build-system)
333 (outputs '("out" "debug"))
335 `(;; It makes no sense to build libguile-ssh.a.
336 #:configure-flags '("--disable-static")
338 #:phases (modify-phases %standard-phases
339 (add-before 'bootstrap 'support-cross-compilation
341 ;; Support cross-compilation:
342 ;; <https://github.com/artyom-poptsov/guile-ssh/issues/30>.
343 (substitute* "libguile-ssh/Makefile.am"
344 (("\\$\\(guile_snarf\\)")
345 "CPP=\"$(CPP)\" $(guile_snarf)"))))
346 (add-before 'build 'fix-libguile-ssh-file-name
347 (lambda* (#:key outputs #:allow-other-keys)
348 ;; Build and install libguile-ssh.so so that we can use
349 ;; its absolute file name in .scm files, before we build
351 (let* ((out (assoc-ref outputs "out"))
352 (lib (string-append out "/lib")))
353 (invoke "make" "install"
356 (parallel-job-count)))
357 (substitute* (find-files "." "\\.scm$")
358 (("\"libguile-ssh\"")
359 (string-append "\"" lib "/libguile-ssh\"")))
361 ,@(if (%current-target-system)
363 '((add-before 'check 'fix-guile-path
364 (lambda* (#:key inputs #:allow-other-keys)
365 (let ((guile (assoc-ref inputs "guile")))
366 (substitute* "tests/common.scm"
368 (string-append guile "/bin/guile")))
370 (add-after 'install 'remove-bin-directory
371 (lambda* (#:key outputs #:allow-other-keys)
372 (let* ((out (assoc-ref outputs "out"))
373 (bin (string-append out "/bin"))
374 (examples (string-append
375 out "/share/guile-ssh/examples")))
377 (rename-file (string-append bin "/ssshd.scm")
378 (string-append examples "/ssshd.scm"))
379 (rename-file (string-append bin "/sssh.scm")
380 (string-append examples "/sssh.scm"))
381 (delete-file-recursively bin)
383 (native-inputs (list autoconf
389 guile-3.0)) ;needed when cross-compiling.
390 (inputs (list guile-3.0 libssh libgcrypt))
391 (synopsis "Guile bindings to libssh")
393 "Guile-SSH is a library that provides access to the SSH protocol for
394 programs written in GNU Guile interpreter. It is a wrapper to the underlying
396 (license license:gpl3+)))
398 (define-public guile2.2-ssh
401 (name "guile2.2-ssh")
403 (modify-inputs (package-native-inputs guile-ssh)
405 (prepend guile-2.2 ;needed when cross-compiling.
407 (inputs (modify-inputs (package-inputs guile-ssh)
408 (replace "guile" guile-2.2)))))
410 (define-public corkscrew
411 ;; The last 2.0 release hails from 2009. Use a fork (submitted upstream as
412 ;; <https://github.com/patpadgett/corkscrew/pull/5>) that adds now-essential
413 ;; IPv6 and TLS support.
415 (commit "268b71e88ee51fddceab96d665b327394f1feb12"))
418 (version (git-version "2.0" revision commit))
423 (url "https://github.com/rtgill82/corkscrew")
426 (base32 "1rylbimlfig3ii4bqr4r058lkc43pqkxnxqpqdpm31blh3xs0dcw"))
427 (file-name (git-file-name name version))))
428 (build-system gnu-build-system)
431 (list "--enable-ssl")
433 (modify-phases %standard-phases
434 (add-after 'unpack 'update-metadata
436 (substitute* "configure.ac"
437 ;; Our version differs significantly.
438 (("2.0") (string-append ,version " (Guix)")))
439 (substitute* "corkscrew.c"
440 ;; This domain's since been squat.
441 (("\\(agroman@agroman\\.net\\)")
442 (format #f "<~a>" ,(package-home-page this-package))))))
443 (add-after 'install 'install-documentation
444 (lambda* (#:key outputs #:allow-other-keys)
445 (let* ((out (assoc-ref outputs "out"))
446 (doc (string-append out "/share/doc/" ,name "-" ,version)))
447 (install-file "README.md" doc)
450 (list autoconf automake pkg-config))
453 (home-page "https://github.com/patpadgett/corkscrew")
454 (synopsis "SSH tunneling through HTTP(S) proxies")
456 "Corkscrew tunnels SSH connections through most HTTP and HTTPS proxies.
457 It supports proxy authentication through the HTTP basic authentication scheme
458 with optional @acronym{TLS, Transport-Level Security} to protect credentials.")
459 (license license:gpl2+))))
467 (uri (string-append "https://mosh.org/mosh-" version ".tar.gz"))
470 "05hjhlp6lk8yjcy59zywpf0r6s0h0b9zxq0lw66dh9x8vxrhaq6s"))))
471 (build-system gnu-build-system)
474 (modify-phases %standard-phases
475 (add-after 'unpack 'patch-FHS-file-names
477 (substitute* "scripts/mosh.pl"
481 (add-after 'install 'wrap
482 (lambda* (#:key outputs #:allow-other-keys)
483 ;; Make sure 'mosh' can find 'mosh-client' and
485 (let* ((out (assoc-ref outputs "out"))
486 (bin (string-append out "/bin")))
487 (wrap-program (string-append bin "/mosh")
488 `("PATH" ":" prefix (,bin)))))))))
492 `(("openssl" ,openssl)
494 ("perl-io-tty" ,perl-io-tty)
497 ("protobuf" ,protobuf)
498 ("boost-headers" ,boost)))
499 (home-page "https://mosh.org/")
500 (synopsis "Remote shell tolerant to intermittent connectivity")
502 "Mosh is a remote terminal application that allows client roaming, supports
503 intermittent connectivity, and provides intelligent local echo and line editing
504 of user keystrokes. It's a replacement for SSH that's more robust and
505 responsive, especially over Wi-Fi, cellular, and long-distance links.")
506 (license license:gpl3+)))
508 (define-public dropbear
516 "https://matt.ucc.asn.au/dropbear/releases/"
517 "dropbear-" version ".tar.bz2"))
519 (base32 "1lbmmmm8f56p24c6jq74rg2kw6kl3w4i5h10vnxjigq2phmqs0rs"))
520 (modules '((guix build utils)))
523 (delete-file-recursively "libtommath")
524 (delete-file-recursively "libtomcrypt")
525 (substitute* "configure"
526 (("-ltomcrypt") "-ltomcrypt -ltommath"))))))
527 (build-system gnu-build-system)
530 #:configure-flags #~(list "--disable-bundled-libtom")
531 ;; The test suite runs an instance of dropbear, which requires a
532 ;; resolver ("Error resolving: Servname not supported for ai_socktype").
534 #:phases #~(modify-phases %standard-phases
535 (add-after 'unpack 'enable-x11-forwarding
537 ;; The following patch was retrieved from:
538 ;; https://github.com/mkj/dropbear/commit/
539 ;; 0292aacdf0aa57d03f2a3ab7e53cf650e6f29389.
540 (substitute* "svr-x11fwd.c"
541 (("DROPBEAR_CHANNEL_PRIO_INTERACTIVE")
542 "DROPBEAR_PRIO_LOWDELAY"))
543 (substitute* "default_options.h"
544 (("#define DROPBEAR_X11FWD 0")
545 "#define DROPBEAR_X11FWD 1")))))))
546 (inputs (list libtomcrypt libtommath zlib))
547 (synopsis "Small SSH server and client")
548 (description "Dropbear is a relatively small SSH server and
549 client. It runs on a variety of POSIX-based platforms. Dropbear is
550 particularly useful for embedded systems, such as wireless routers.")
551 (home-page "https://matt.ucc.asn.au/dropbear/dropbear.html")
552 (license (license:x11-style "" "See file LICENSE."))))
554 (define-public liboop
561 (uri (string-append "http://ftp.lysator.liu.se/pub/liboop/"
562 name "-" version ".tar.gz"))
565 "1q0p1l72pq9k3bi7a366j2rishv7dzzkg3i6r2npsfg7cnnidbsn"))))
566 (build-system gnu-build-system)
567 (home-page "https://www.lysator.liu.se/liboop/")
568 (synopsis "Event loop library")
569 (description "Liboop is a low-level event loop management library for
570 POSIX-based operating systems. It supports the development of modular,
571 multiplexed applications which may respond to events from several sources. It
572 replaces the \"select() loop\" and allows the registration of event handlers
573 for file and network I/O, timers and signals. Since processes use these
574 mechanisms for almost all external communication, liboop can be used as the
575 basis for almost any application.")
576 (license license:lgpl2.1+)))
584 (uri (string-append "mirror://gnu/lsh/lsh-"
588 "1qqjy9zfzgny0rkb27c8c7dfsylvb6n0ld8h3an2r83pmaqr9gwb"))
589 (modules '((guix build utils)))
592 (substitute* "src/testsuite/functions.sh"
594 ;; Avoid host name lookups since they don't work in
598 ;; Make tests more verbose.
601 (substitute* (find-files "src/testsuite" "-test$")
602 (("localhost") "127.0.0.1"))
604 (substitute* "src/testsuite/login-auth-test"
605 (("/bin/cat") "cat"))))
606 (patches (search-patches "lsh-fix-x11-forwarding.patch"))))
607 (build-system gnu-build-system)
614 psmisc)) ; for `killall'
618 ;; 'rl.c' uses the 'CPPFunction' type, which is no longer in
624 ;; The server (lshd) invokes xauth when X11 forwarding is requested.
625 ;; This adds 24 MiB (or 27%) to the closure of lsh.
627 libxau)) ;also required for x11-forwarding
629 '(;; Skip the `configure' test that checks whether /dev/ptmx &
630 ;; co. work as expected, because it relies on impurities (for
631 ;; instance, /dev/pts may be unavailable in chroots.)
632 #:configure-flags '("lsh_cv_sys_unix98_ptys=yes"
634 ;; Use glibc's argp rather than the bundled one.
637 ;; 'lsh_argp.h' checks HAVE_ARGP_PARSE but nothing
639 "CPPFLAGS=-DHAVE_ARGP_PARSE"
641 ;; Fix the build of lsh@2.1 with GCC 10.
642 "CFLAGS=-O2 -g -fcommon")
644 (modify-phases %standard-phases
645 (add-after 'unpack 'disable-failing-tests
647 ;; FIXME: Most tests won't run in a chroot, presumably because
648 ;; /etc/profile is missing, and thus clients get an empty $PATH
649 ;; and nothing works. Run only the subset that passes.
650 (delete-file "configure") ;force rebootstrap
651 (substitute* "src/testsuite/Makefile.am"
652 (("seed-test \\\\") ;prevent trailing slash
654 (("^\t(lsh|daemon|tcpip|socks|lshg|lcp|rapid7|lshd).*test.*")
656 (add-before 'configure 'pre-configure
657 (lambda* (#:key inputs #:allow-other-keys)
658 (let* ((nettle (assoc-ref inputs "nettle"))
659 (sexp-conv (string-append nettle "/bin/sexp-conv")))
660 ;; Remove argp from the list of sub-directories; we don't want
661 ;; to build it, really.
662 (substitute* "src/Makefile.in"
666 ;; Make sure 'lsh' and 'lshd' pick 'sexp-conv' in the right place
668 (substitute* "src/environ.h.in"
669 (("^#define PATH_SEXP_CONV.*")
670 (string-append "#define PATH_SEXP_CONV \""
673 ;; Same for the 'lsh-authorize' script.
674 (substitute* "src/lsh-authorize"
676 (string-append "=" sexp-conv)))
678 ;; Tell lshd where 'xauth' lives. Another option would be to
679 ;; hardcode "/run/current-system/profile/bin/xauth", thereby
680 ;; reducing the closure size, but that wouldn't work on foreign
682 (with-fluids ((%default-port-encoding "ISO-8859-1"))
683 (substitute* "src/server_x11.c"
684 (("define XAUTH_PROGRAM.*")
685 (string-append "define XAUTH_PROGRAM \""
686 (assoc-ref inputs "xauth")
687 "/bin/xauth\"\n")))))
689 ;; Tests rely on $USER being set.
690 (setenv "USER" "guix"))))))
691 (home-page "https://www.lysator.liu.se/~nisse/lsh/")
692 (synopsis "GNU implementation of the Secure Shell (ssh) protocols")
694 "GNU lsh is a free implementation of the SSH version 2 protocol. It is
695 used to create a secure line of communication between two computers,
696 providing shell access to the server system from the client. It provides
697 both the server daemon and the client application, as well as tools for
698 manipulating key files.")
699 (license license:gpl2+)))
701 (define-public sshpass
708 (uri (string-append "mirror://sourceforge/sshpass/sshpass/"
709 version "/sshpass-" version ".tar.gz"))
711 (base32 "1dwzqknpswa8vjlbwsx9rcq1j2a7px9h9i2anh09pzkz0mg6wx3i"))))
712 (build-system gnu-build-system)
713 (home-page "https://sourceforge.net/projects/sshpass/")
714 (synopsis "Non-interactive password authentication with SSH")
715 (description "sshpass is a tool for non-interactively performing password
716 authentication with SSH's so-called @dfn{interactive keyboard password
718 (license license:gpl2+)))
720 (define-public autossh
728 "https://www.harding.motd.ca/autossh/autossh-"
731 (base32 "0xqjw8df68f4kzkns5gcah61s5wk0m44qdk2z1d6388w6viwxhsz"))))
732 (build-system gnu-build-system)
733 (arguments `(#:tests? #f)) ; There is no "make check" or anything similar
734 (inputs (list openssh))
735 (synopsis "Automatically restart SSH sessions and tunnels")
736 (description "autossh is a program to start a copy of @command{ssh} and
737 monitor it, restarting it as necessary should it die or stop passing traffic.")
738 (home-page "https://www.harding.motd.ca/autossh/")
740 ;; Why point to a source file? Well, all the individual files have a
741 ;; copy of this license in their headers, but there's no separate file
742 ;; with that information.
743 (license:non-copyleft "file://autossh.c"))))
752 (uri (string-append "https://github.com/chaos/pdsh/"
753 "releases/download/pdsh-" version
754 "/pdsh-" version ".tar.gz"))
756 (base32 "1s91hmhrz7rfb6h3l5k97s393rcm1ww3svp8dx5z8vkkc933wyxl"))))
757 (build-system gnu-build-system)
762 (modify-phases %standard-phases
763 (add-after 'unpack 'patch-/bin/sh
765 (substitute* '("tests/t0006-pdcp.sh"
766 "tests/t0004-module-loading.sh"
768 "tests/t1003-slurm.sh"
769 "tests/t6036-long-output-lines.sh"
770 "tests/aggregate-results.sh"
771 "tests/t2000-exec.sh"
772 "tests/t0002-internal.sh"
773 "tests/t1002-dshgroup.sh"
774 "tests/t5000-dshbak.sh"
775 "tests/t0001-basic.sh"
776 "tests/t0005-rcmd_type-and-user.sh"
778 "tests/t2002-mrsh.sh"
779 "tests/t0003-wcoll.sh"
780 "tests/test-modules/pcptest.c")
781 (("/bin/sh") (which "bash")))
783 (add-after 'unpack 'patch-tests
785 (substitute* "tests/t6036-long-output-lines.sh"
786 (("which") (which "which")))
789 (list openssh mit-krb5 perl))
792 (home-page "https://github.com/chaos/pdsh")
793 (synopsis "Parallel distributed shell")
794 (description "Pdsh is a an efficient, multithreaded remote shell client
795 which executes commands on multiple remote hosts in parallel. Pdsh implements
796 dynamically loadable modules for extended functionality such as new remote
797 shell services and remote host selection.")
798 (license license:gpl2+)))
800 (define-public python-asyncssh
802 (name "python-asyncssh")
807 (uri (pypi-uri "asyncssh" version))
810 "0mkvyv2fmbdfnfdh7g2im0gxnp8hwxv5g1xdazfsipd9ggknrhsr"))))
811 (build-system python-build-system)
813 (list python-cryptography python-pyopenssl python-gssapi
814 python-bcrypt python-typing-extensions))
816 (list openssh openssl python-fido2 python-aiofiles netcat
820 (modify-phases %standard-phases
821 (add-after 'unpack 'disable-tests
823 (substitute* "tests/test_connection.py"
824 ;; nc is always available.
825 (("which nc") "true"))
826 (substitute* "tests/test_agent.py"
827 ;; TODO Test fails for unknown reason
828 (("(.+)async def test_confirm" all indent)
829 (string-append indent "@unittest.skip('disabled by guix')\n"
830 indent "async def test_confirm")))))
832 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
834 (invoke "pytest" "-vv")))))))
835 (home-page "https://asyncssh.readthedocs.io/")
836 (synopsis "Asynchronous SSHv2 client and server library for Python")
838 "AsyncSSH is a Python package which provides an asynchronous client and
839 server implementation of the SSHv2 protocol on top of the Python 3.6+ asyncio
841 (license license:epl2.0)))
843 (define-public clustershell
845 (name "clustershell")
851 (url "https://github.com/cea-hpc/clustershell")
852 (commit (string-append "v" version))))
853 (file-name (git-file-name name version))
855 (base32 "11b87vyamcw4rvgxz74jxwkr9ly0h9ldp2wqsi5wc19p0r06la5j"))))
856 (build-system python-build-system)
857 (inputs (list openssh))
858 (propagated-inputs (list python-pyyaml))
860 `(#:phases (modify-phases %standard-phases
861 (add-before 'build 'record-openssh-file-name
862 (lambda* (#:key inputs #:allow-other-keys)
863 (let ((ssh (assoc-ref inputs "openssh")))
864 (substitute* "lib/ClusterShell/Worker/Ssh.py"
865 (("info\\(\"ssh_path\"\\) or \"ssh\"")
866 (string-append "info(\"ssh_path\") or \""
867 ssh "/bin/ssh\"")))))))))
868 (home-page "https://cea-hpc.github.io/clustershell/")
869 (synopsis "Scalable event-driven Python framework for cluster administration")
871 "ClusterShell is an event-driven Python framework, designed to run local
872 or distant commands in parallel on server farms or on large GNU/Linux
873 clusters. It will take care of common issues encountered on HPC clusters,
874 such as operating on groups of nodes, running distributed commands using
875 optimized execution algorithms, as well as gathering results and merging
876 identical outputs, or retrieving return codes. ClusterShell takes advantage
877 of existing remote shell facilities such as SSH.")
878 (license license:lgpl2.1+)))
880 (define-public endlessh
888 (url "https://github.com/skeeto/endlessh")
890 (file-name (git-file-name name version))
892 (base32 "0ziwr8j1frsp3dajr8h5glkm1dn5cci404kazz5w1jfrp0736x68"))))
893 (build-system gnu-build-system)
895 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
896 ,(string-append "CC=" (cc-for-target)))
897 #:tests? #f ; no test target
899 (modify-phases %standard-phases
900 (delete 'configure)))) ; no configure script
901 (home-page "https://github.com/skeeto/endlessh")
902 (synopsis "SSH tarpit that slowly sends an endless banner")
904 "Endlessh is an SSH tarpit that very slowly sends an endless, random SSH
905 banner. It keeps SSH clients locked up for hours or even days at a time. The
906 purpose is to put your real SSH server on another port and then let the script
907 kiddies get stuck in this tarpit instead of bothering a real server.
909 Since the tarpit is in the banner before any cryptographic exchange occurs, this
910 program doesn't depend on any cryptographic libraries. It's a simple,
911 single-threaded, standalone C program. It uses @code{poll()} to trap multiple
913 (license license:unlicense)))
915 (define-public webssh
922 (url "https://github.com/huashengdun/webssh")
923 (commit (string-append "v" version))))
924 (file-name (git-file-name name version))
927 "1bcy9flrzbvams5p77swwiygv54ac58ia7hpic1bvg30b3wpvv7b"))))
928 (build-system python-build-system)
930 (list python-paramiko python-tornado))
931 (home-page "https://webssh.huashengdun.org/")
932 (synopsis "Web application to be used as an SSH client")
933 (description "This package provides a web application to be used as an SSH
938 @item SSH password authentication supported, including empty password.
939 @item SSH public-key authentication supported, including DSA RSA ECDSA
941 @item Encrypted keys supported.
942 @item Two-Factor Authentication (time-based one-time password) supported.
943 @item Fullscreen terminal supported.
944 @item Terminal window resizable.
945 @item Auto detect the ssh server's default encoding.
946 @item Modern browsers are supported.
948 (license license:expat)))