Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / ssh.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 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 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
7 ;;; Copyright © 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
8 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
9 ;;; Copyright © 2017, 2018 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 Nils Gillmann <ng0@n0.is>
13 ;;;
14 ;;; This file is part of GNU Guix.
15 ;;;
16 ;;; GNU Guix is free software; you can redistribute it and/or modify it
17 ;;; under the terms of the GNU General Public License as published by
18 ;;; the Free Software Foundation; either version 3 of the License, or (at
19 ;;; your option) any later version.
20 ;;;
21 ;;; GNU Guix is distributed in the hope that it will be useful, but
22 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 ;;; GNU General Public License for more details.
25 ;;;
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28
29 (define-module (gnu packages ssh)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages autotools)
32 #:use-module (gnu packages base)
33 #:autoload (gnu packages boost) (boost)
34 #:use-module (gnu packages compression)
35 #:use-module (gnu packages crypto)
36 #:use-module (gnu packages elf)
37 #:use-module (gnu packages gnupg)
38 #:use-module (gnu packages gperf)
39 #:use-module (gnu packages groff)
40 #:use-module (gnu packages guile)
41 #:use-module (gnu packages linux)
42 #:use-module (gnu packages logging)
43 #:use-module (gnu packages m4)
44 #:use-module (gnu packages multiprecision)
45 #:use-module (gnu packages ncurses)
46 #:use-module (gnu packages nettle)
47 #:use-module (gnu packages kerberos)
48 #:use-module (gnu packages perl)
49 #:use-module (gnu packages pkg-config)
50 #:use-module (gnu packages popt)
51 #:autoload (gnu packages protobuf) (protobuf)
52 #:use-module (gnu packages readline)
53 #:use-module (gnu packages texinfo)
54 #:use-module (gnu packages tls)
55 #:use-module (gnu packages xorg)
56 #:use-module (guix build-system cmake)
57 #:use-module (guix build-system gnu)
58 #:use-module (guix download)
59 #:use-module (guix git-download)
60 #:use-module ((guix licenses) #:prefix license:)
61 #:use-module (guix packages)
62 #:use-module (srfi srfi-1))
63
64 (define-public libssh
65 ;; This commit from the 'v0-7' branch contains 7 memory-management-related
66 ;; bug fixes that we'd rather have.
67 (let ((commit "239d0f75b5f909174c2ef7fb08d23bcfa6b20ba0")
68 (revision "0"))
69 (package
70 (name "libssh")
71 (version (git-version "0.7.5" revision commit))
72 (source (origin
73 (method git-fetch)
74 (uri (git-reference
75 (url "https://git.libssh.org/projects/libssh.git")
76 (commit commit)))
77 (sha256
78 (base32
79 "01w72w1jsgs9ilj3n1gp6qkmdxr9n74i5h2nipi3x1vzm7bv8na1"))
80 (patches (search-patches "libssh-hostname-parser-bug.patch"))
81 (file-name (git-file-name name version))))
82 (build-system cmake-build-system)
83 (outputs '("out" "debug"))
84 (arguments
85 '(#:configure-flags '("-DWITH_GCRYPT=ON")
86
87 ;; TODO: Add 'CMockery' and '-DWITH_TESTING=ON' for the test suite.
88 #:tests? #f))
89 (inputs `(("zlib" ,zlib)
90 ("libgcrypt" ,libgcrypt)))
91 (synopsis "SSH client library")
92 (description
93 "libssh is a C library implementing the SSHv2 and SSHv1 protocol for
94 client and server implementations. With libssh, you can remotely execute
95 programs, transfer files, and use a secure and transparent tunnel for your
96 remote applications.")
97 (home-page "https://www.libssh.org")
98 (license license:lgpl2.1+))))
99
100 (define-public libssh2
101 (package
102 (name "libssh2")
103 (version "1.8.0")
104 (source (origin
105 (method url-fetch)
106 (uri (string-append
107 "https://www.libssh2.org/download/libssh2-"
108 version ".tar.gz"))
109 (sha256
110 (base32
111 "1m3n8spv79qhjq4yi0wgly5s5rc8783jb1pyra9bkx1md0plxwrr"))
112 (patches
113 (search-patches "libssh2-fix-build-failure-with-gcrypt.patch"))))
114 (build-system gnu-build-system)
115 ;; The installed libssh2.pc file does not include paths to libgcrypt and
116 ;; zlib libraries, so we need to propagate the inputs.
117 (propagated-inputs `(("libgcrypt" ,libgcrypt)
118 ("zlib" ,zlib)))
119 (arguments '(#:configure-flags `("--with-libgcrypt")
120 #:phases (modify-phases %standard-phases
121 (add-before 'configure 'autoreconf
122 (lambda _
123 (invoke "autoreconf" "-v"))))))
124 (native-inputs `(("autoconf" ,autoconf)
125 ("automake" ,automake)))
126 (synopsis "Client-side C library implementing the SSH2 protocol")
127 (description
128 "libssh2 is a library intended to allow software developers access to
129 the SSH-2 protocol in an easy-to-use self-contained package. It can be built
130 into an application to perform many different tasks when communicating with
131 a server that supports the SSH-2 protocol.")
132 (license license:bsd-3)
133 (home-page "http://www.libssh2.org/")))
134
135 (define-public openssh
136 (package
137 (name "openssh")
138 (version "7.7p1")
139 (source (origin
140 (method url-fetch)
141 (uri (string-append "mirror://openbsd/OpenSSH/portable/"
142 name "-" version ".tar.gz"))
143 (sha256
144 (base32
145 "13vbbrvj3mmfhj83qyrg5c0ipr6bzw5s65dy4k8gr7p9hkkfffyp"))))
146 (build-system gnu-build-system)
147 (native-inputs `(("groff" ,groff)))
148 (inputs `(("openssl" ,openssl)
149 ("pam" ,linux-pam)
150 ("mit-krb5" ,mit-krb5)
151 ("zlib" ,zlib)
152 ("xauth" ,xauth))) ;for 'ssh -X' and 'ssh -Y'
153 (arguments
154 `(#:test-target "tests"
155 ;; Otherwise, the test scripts try to use a nonexistent directory and
156 ;; fail.
157 #:make-flags '("REGRESSTMP=\"$${BUILDDIR}/regress\"")
158 #:configure-flags `("--sysconfdir=/etc/ssh"
159
160 ;; Default value of 'PATH' used by sshd.
161 "--with-default-path=/run/current-system/profile/bin"
162
163 ;; configure needs to find krb5-config
164 ,(string-append "--with-kerberos5="
165 (assoc-ref %build-inputs "mit-krb5")
166 "/bin")
167
168 ;; Enable PAM support in sshd.
169 "--with-pam")
170
171 #:phases
172 (modify-phases %standard-phases
173 (add-after 'configure 'reset-/var/empty
174 (lambda* (#:key outputs #:allow-other-keys)
175 (let ((out (assoc-ref outputs "out")))
176 (substitute* "Makefile"
177 (("PRIVSEP_PATH=/var/empty")
178 (string-append "PRIVSEP_PATH=" out "/var/empty")))
179 #t)))
180 (add-before 'check 'patch-tests
181 (lambda _
182 ;; remove 't-exec' regress target which requires user 'sshd'
183 (substitute* "regress/Makefile"
184 (("^(REGRESS_TARGETS=.*) t-exec(.*)" all pre post)
185 (string-append pre post)))
186 #t))
187 (replace 'install
188 (lambda* (#:key outputs (make-flags '()) #:allow-other-keys)
189 ;; install without host keys and system configuration files
190 (apply invoke "make" "install-nosysconf" make-flags)
191 (install-file "contrib/ssh-copy-id"
192 (string-append (assoc-ref outputs "out")
193 "/bin/"))
194 (chmod (string-append (assoc-ref outputs "out")
195 "/bin/ssh-copy-id") #o555)
196 (install-file "contrib/ssh-copy-id.1"
197 (string-append (assoc-ref outputs "out")
198 "/share/man/man1/"))
199 #t)))))
200 (synopsis "Client and server for the secure shell (ssh) protocol")
201 (description
202 "The SSH2 protocol implemented in OpenSSH is standardised by the
203 IETF secsh working group and is specified in several RFCs and drafts.
204 It is composed of three layered components:
205
206 The transport layer provides algorithm negotiation and a key exchange.
207 The key exchange includes server authentication and results in a
208 cryptographically secured connection: it provides integrity, confidentiality
209 and optional compression.
210
211 The user authentication layer uses the established connection and relies on
212 the services provided by the transport layer. It provides several mechanisms
213 for user authentication. These include traditional password authentication
214 as well as public-key or host-based authentication mechanisms.
215
216 The connection layer multiplexes many different concurrent channels over the
217 authenticated connection and allows tunneling of login sessions and
218 TCP-forwarding. It provides a flow control service for these channels.
219 Additionally, various channel-specific options can be negotiated.")
220 (license (license:non-copyleft "file://LICENSE"
221 "See LICENSE in the distribution."))
222 (home-page "http://www.openssh.org/")))
223
224 (define-public guile-ssh
225 (package
226 (name "guile-ssh")
227 (version "0.11.2")
228 (home-page "https://github.com/artyom-poptsov/guile-ssh")
229 (source (origin
230 ;; ftp://memory-heap.org/software/guile-ssh/guile-ssh-VERSION.tar.gz
231 ;; exists, but the server appears to be too slow and unreliable.
232 ;; Also, using this URL allows the GitHub updater to work.
233 (method url-fetch)
234 (uri (string-append home-page "/archive/v"
235 version ".tar.gz"))
236 (file-name (string-append name "-" version ".tar.gz"))
237 (sha256
238 (base32
239 "1w0k5s09xj5xycb7lbp5b7rm0xncclms3jwl98lwj8fxwngi1s90"))))
240 (build-system gnu-build-system)
241 (outputs '("out" "debug"))
242 (arguments
243 '(#:phases (modify-phases %standard-phases
244 (add-after 'unpack 'autoreconf
245 (lambda* (#:key inputs #:allow-other-keys)
246 (zero? (system* "autoreconf" "-vfi"))))
247 (add-before 'build 'fix-libguile-ssh-file-name
248 (lambda* (#:key outputs #:allow-other-keys)
249 ;; Build and install libguile-ssh.so so that we can use
250 ;; its absolute file name in .scm files, before we build
251 ;; the .go files.
252 (and (zero? (system* "make" "install"
253 "-C" "libguile-ssh"
254 "-j" (number->string
255 (parallel-job-count))))
256 (let* ((out (assoc-ref outputs "out"))
257 (libdir (string-append out "/lib")))
258 (substitute* (find-files "." "\\.scm$")
259 (("\"libguile-ssh\"")
260 (string-append "\"" libdir "/libguile-ssh\"")))
261 #t))))
262 (add-after 'install 'remove-bin-directory
263 (lambda* (#:key outputs #:allow-other-keys)
264 (let* ((out (assoc-ref outputs "out"))
265 (bin (string-append out "/bin"))
266 (examples (string-append
267 out "/share/guile-ssh/examples")))
268 (mkdir-p examples)
269 (rename-file (string-append bin "/ssshd.scm")
270 (string-append examples "/ssshd.scm"))
271 (rename-file (string-append bin "/sssh.scm")
272 (string-append examples "/sssh.scm"))
273 (delete-file-recursively bin)
274 #t))))
275 ;; Tests are not parallel-safe.
276 #:parallel-tests? #f))
277 (native-inputs `(("autoconf" ,autoconf)
278 ("automake" ,automake)
279 ("libtool" ,libtool)
280 ("texinfo" ,texinfo)
281 ("pkg-config" ,pkg-config)
282 ("which" ,which)))
283 (inputs `(("guile" ,guile-2.2)
284 ("libssh" ,libssh)
285 ("libgcrypt" ,libgcrypt)))
286 (synopsis "Guile bindings to libssh")
287 (description
288 "Guile-SSH is a library that provides access to the SSH protocol for
289 programs written in GNU Guile interpreter. It is a wrapper to the underlying
290 libssh library.")
291 (license license:gpl3+)))
292
293 (define-public guile2.2-ssh
294 (deprecated-package "guile2.2-ssh" guile-ssh))
295
296 (define-public guile2.0-ssh
297 (package
298 (inherit guile-ssh)
299 (name "guile2.0-ssh")
300 (inputs `(("guile" ,guile-2.0)
301 ,@(alist-delete "guile" (package-inputs guile-ssh))))))
302
303 (define-public corkscrew
304 (package
305 (name "corkscrew")
306 (version "2.0")
307 (source
308 (origin
309 (method url-fetch)
310 ;; The agroman.net domain name expired on 2017-03-23, and the original
311 ;; "http://www.agroman.net/corkscrew/corkscrew-2.0.tar.gz" now returns
312 ;; bogus HTML. Perhaps it will yet return. Until then, use a mirror.
313 (uri (string-append "https://downloads.openwrt.org/sources/"
314 "corkscrew-" version ".tar.gz"))
315 (sha256 (base32
316 "1gmhas4va6gd70i2x2mpxpwpgww6413mji29mg282jms3jscn3qd"))))
317 (build-system gnu-build-system)
318 (arguments
319 ;; Replace configure phase as the ./configure script does not link
320 ;; CONFIG_SHELL and SHELL passed as parameters
321 '(#:phases
322 (modify-phases %standard-phases
323 (replace 'configure
324 (lambda* (#:key outputs inputs system build target
325 #:allow-other-keys #:rest args)
326 (let* ((configure (assoc-ref %standard-phases 'configure))
327 (prefix (assoc-ref outputs "out"))
328 (bash (which "bash"))
329 ;; Set --build and --host flags as the provided config.guess
330 ;; is not able to detect them
331 (flags `(,(string-append "--prefix=" prefix)
332 ,(string-append "--build=" build)
333 ,(string-append "--host=" (or target build)))))
334 (setenv "CONFIG_SHELL" bash)
335 (zero? (apply system* bash
336 (string-append "." "/configure")
337 flags)))))
338 (add-after 'install 'install-documentation
339 (lambda* (#:key outputs #:allow-other-keys)
340 (let* ((out (assoc-ref outputs "out"))
341 (doc (string-append out "/share/doc/corkscrew")))
342 (install-file "README" doc)
343 #t))))))
344 (home-page "http://www.agroman.net/corkscrew")
345 (synopsis "SSH tunneling through HTTP(S) proxies")
346 (description
347 "Corkscrew tunnels SSH connections through most HTTP and HTTPS proxies.
348 Proxy authentication is only supported through the plain-text HTTP basic
349 authentication scheme.")
350 (license license:gpl2+)))
351
352 (define-public mosh
353 (package
354 (name "mosh")
355 (version "1.3.2")
356 (source (origin
357 (method url-fetch)
358 (uri (string-append "https://mosh.org/mosh-" version ".tar.gz"))
359 (sha256
360 (base32
361 "05hjhlp6lk8yjcy59zywpf0r6s0h0b9zxq0lw66dh9x8vxrhaq6s"))))
362 (build-system gnu-build-system)
363 (arguments
364 '(#:phases
365 (modify-phases %standard-phases
366 (add-after 'install 'wrap
367 (lambda* (#:key outputs #:allow-other-keys)
368 ;; Make sure 'mosh' can find 'mosh-client' and
369 ;; 'mosh-server'.
370 (let* ((out (assoc-ref outputs "out"))
371 (bin (string-append out "/bin")))
372 (wrap-program (string-append bin "/mosh")
373 `("PATH" ":" prefix (,bin)))))))))
374 (native-inputs
375 `(("pkg-config" ,pkg-config)))
376 (inputs
377 `(("openssl" ,openssl)
378 ("perl" ,perl)
379 ("perl-io-tty" ,perl-io-tty)
380 ("zlib" ,zlib)
381 ("ncurses" ,ncurses)
382 ("protobuf" ,protobuf)
383 ("boost-headers" ,boost)))
384 (home-page "https://mosh.org/")
385 (synopsis "Remote shell tolerant to intermittent connectivity")
386 (description
387 "Remote terminal application that allows roaming, supports intermittent
388 connectivity, and provides intelligent local echo and line editing of user
389 keystrokes. Mosh is a replacement for SSH. It's more robust and responsive,
390 especially over Wi-Fi, cellular, and long-distance links.")
391 (license license:gpl3+)))
392
393 (define-public et
394 (package
395 (name "et")
396 (version "3.1.0")
397 (source
398 (origin
399 (method url-fetch)
400 (uri (string-append
401 "https://github.com/MisterTea/EternalTCP/archive/et-v"
402 version ".tar.gz"))
403 (sha256
404 (base32 "1n2w2kqbshdmbb0gz4yizyw9gqfls6qm2dnwx1d9c2hz7hmi7521"))))
405 (build-system cmake-build-system)
406 (arguments `(#:tests? #f))
407 (native-inputs
408 `(("pkg-config" ,pkg-config)))
409 (inputs `(("glog" ,glog)
410 ("gflags" ,gflags)
411 ("libsodium" ,libsodium)
412 ("protobuf" ,protobuf)))
413 (synopsis "Remote shell that automatically reconnects")
414 (description
415 "Eternal Terminal (ET) is a remote shell that automatically reconnects
416 without interrupting the session. Unlike SSH sessions, ET sessions will
417 survive even network outages and IP changes. ET uses a custom protocol over
418 TCP, not the SSH protocol.")
419 (home-page "https://mistertea.github.io/EternalTCP/")
420 (license license:asl2.0)))
421
422 (define-public dropbear
423 (package
424 (name "dropbear")
425 (version "2018.76")
426 (source (origin
427 (method url-fetch)
428 (uri (string-append
429 "https://matt.ucc.asn.au/" name "/releases/"
430 name "-" version ".tar.bz2"))
431 (sha256
432 (base32
433 "0rgavbzw7jrs5wslxm0dnwx2m409yzxd9hazd92r7kx8xikr3yzj"))))
434 (build-system gnu-build-system)
435 (arguments `(#:tests? #f)) ; there is no "make check" or anything similar
436 (inputs `(("zlib" ,zlib)))
437 (synopsis "Small SSH server and client")
438 (description "Dropbear is a relatively small SSH server and
439 client. It runs on a variety of POSIX-based platforms. Dropbear is
440 particularly useful for embedded systems, such as wireless routers.")
441 (home-page "https://matt.ucc.asn.au/dropbear/dropbear.html")
442 (license (license:x11-style "" "See file LICENSE."))))
443
444 (define-public liboop
445 (package
446 (name "liboop")
447 (version "1.0")
448 (source
449 (origin
450 (method url-fetch)
451 (uri (string-append "http://download.ofb.net/liboop/liboop-"
452 version ".tar.gz"))
453 (sha256
454 (base32
455 "0z6rlalhvfca64jpvksppc9bdhs7jwhiw4y35g5ibvh91xp3rn1l"))
456 (patches (search-patches "liboop-mips64-deplibs-fix.patch"))))
457 (build-system gnu-build-system)
458 (home-page "http://www.lysator.liu.se/liboop/")
459 (synopsis "Event loop library")
460 (description "Liboop is a low-level event loop management library for
461 POSIX-based operating systems. It supports the development of modular,
462 multiplexed applications which may respond to events from several sources. It
463 replaces the \"select() loop\" and allows the registration of event handlers
464 for file and network I/O, timers and signals. Since processes use these
465 mechanisms for almost all external communication, liboop can be used as the
466 basis for almost any application.")
467 (license license:lgpl2.1+)))
468
469 (define-public lsh
470 (package
471 (name "lsh")
472 (version "2.1")
473 (source (origin
474 (method url-fetch)
475 (uri (string-append "mirror://gnu/lsh/lsh-"
476 version ".tar.gz"))
477 (sha256
478 (base32
479 "1qqjy9zfzgny0rkb27c8c7dfsylvb6n0ld8h3an2r83pmaqr9gwb"))
480 (modules '((guix build utils)))
481 (snippet
482 '(begin
483 (substitute* "src/testsuite/functions.sh"
484 (("localhost")
485 ;; Avoid host name lookups since they don't work in
486 ;; chroot builds.
487 "127.0.0.1")
488 (("set -e")
489 ;; Make tests more verbose.
490 "set -e\nset -x"))
491
492 (substitute* (find-files "src/testsuite" "-test$")
493 (("localhost") "127.0.0.1"))
494
495 (substitute* "src/testsuite/login-auth-test"
496 (("/bin/cat") "cat"))
497 #t))))
498 (build-system gnu-build-system)
499 (native-inputs
500 `(("m4" ,m4)
501 ("guile" ,guile-2.0)
502 ("gperf" ,gperf)
503 ("psmisc" ,psmisc))) ; for `killall'
504 (inputs
505 `(("nettle" ,nettle-2)
506 ("linux-pam" ,linux-pam)
507
508 ;; 'rl.c' uses the 'CPPFunction' type, which is no longer in
509 ;; Readline 6.3.
510 ("readline" ,readline-6.2)
511
512 ("liboop" ,liboop)
513 ("zlib" ,zlib)
514 ("gmp" ,gmp)
515
516 ;; The server (lshd) invokes xauth when X11 forwarding is requested.
517 ;; This adds 24 MiB (or 27%) to the closure of lsh.
518 ("xauth" ,xauth)))
519 (arguments
520 '(;; Skip the `configure' test that checks whether /dev/ptmx &
521 ;; co. work as expected, because it relies on impurities (for
522 ;; instance, /dev/pts may be unavailable in chroots.)
523 #:configure-flags '("lsh_cv_sys_unix98_ptys=yes"
524
525 ;; Use glibc's argp rather than the bundled one.
526 "--with-system-argp"
527
528 ;; 'lsh_argp.h' checks HAVE_ARGP_PARSE but nothing
529 ;; defines it.
530 "CPPFLAGS=-DHAVE_ARGP_PARSE")
531
532 ;; FIXME: Tests won't run in a chroot, presumably because
533 ;; /etc/profile is missing, and thus clients get an empty $PATH
534 ;; and nothing works.
535 #:tests? #f
536
537 #:phases
538 (modify-phases %standard-phases
539 (add-before 'configure 'pre-configure
540 (lambda* (#:key inputs #:allow-other-keys)
541 (let* ((nettle (assoc-ref inputs "nettle"))
542 (sexp-conv (string-append nettle "/bin/sexp-conv")))
543 ;; Remove argp from the list of sub-directories; we don't want
544 ;; to build it, really.
545 (substitute* "src/Makefile.in"
546 (("^SUBDIRS = argp")
547 "SUBDIRS ="))
548
549 ;; Make sure 'lsh' and 'lshd' pick 'sexp-conv' in the right place
550 ;; by default.
551 (substitute* "src/environ.h.in"
552 (("^#define PATH_SEXP_CONV.*")
553 (string-append "#define PATH_SEXP_CONV \""
554 sexp-conv "\"\n")))
555
556 ;; Same for the 'lsh-authorize' script.
557 (substitute* "src/lsh-authorize"
558 (("=sexp-conv")
559 (string-append "=" sexp-conv)))
560
561 ;; Tell lshd where 'xauth' lives. Another option would be to
562 ;; hardcode "/run/current-system/profile/bin/xauth", thereby
563 ;; reducing the closure size, but that wouldn't work on foreign
564 ;; distros.
565 (with-fluids ((%default-port-encoding "ISO-8859-1"))
566 (substitute* "src/server_x11.c"
567 (("define XAUTH_PROGRAM.*")
568 (string-append "define XAUTH_PROGRAM \""
569 (assoc-ref inputs "xauth")
570 "/bin/xauth\"\n")))))
571
572 ;; Tests rely on $USER being set.
573 (setenv "USER" "guix"))))))
574 (home-page "http://www.lysator.liu.se/~nisse/lsh/")
575 (synopsis "GNU implementation of the Secure Shell (ssh) protocols")
576 (description
577 "GNU lsh is a free implementation of the SSH version 2 protocol. It is
578 used to create a secure line of communication between two computers,
579 providing shell access to the server system from the client. It provides
580 both the server daemon and the client application, as well as tools for
581 manipulating key files.")
582 (license license:gpl2+)))
583
584 (define-public sshpass
585 (package
586 (name "sshpass")
587 (version "1.06")
588 (synopsis "Non-interactive password authentication with SSH")
589 (home-page "https://sourceforge.net/projects/sshpass/")
590 (source
591 (origin
592 (method url-fetch)
593 (uri (string-append "mirror://sourceforge/sshpass/sshpass/"
594 version "/sshpass-" version ".tar.gz"))
595 (sha256
596 (base32
597 "0q7fblaczb7kwbsz0gdy9267z0sllzgmf0c7z5c9mf88wv74ycn6"))))
598 (build-system gnu-build-system)
599 (description "sshpass is a tool for non-interactivly performing password
600 authentication with SSH's so-called @dfn{interactive keyboard password
601 authentication}.")
602 (license license:gpl2+)))
603
604 (define-public autossh
605 (package
606 (name "autossh")
607 (version "1.4f")
608 (source
609 (origin
610 (method url-fetch)
611 (uri (string-append
612 "http://www.harding.motd.ca/autossh/autossh-"
613 version ".tgz"))
614 (sha256
615 (base32 "1wpqwa2872nqgqbhnb6nnkrlzpdawd5k69gh1qp68354pvhyawh1"))))
616 (build-system gnu-build-system)
617 (arguments `(#:tests? #f)) ; There is no "make check" or anything similar
618 (inputs `(("openssh" ,openssh)))
619 (synopsis "Automatically restart SSH sessions and tunnels")
620 (description "autossh is a program to start a copy of @command{ssh} and
621 monitor it, restarting it as necessary should it die or stop passing traffic.")
622 (home-page "http://www.harding.motd.ca/autossh/")
623 (license
624 ;; Why point to a source file? Well, all the individual files have a
625 ;; copy of this license in their headers, but there's no separate file
626 ;; with that information.
627 (license:non-copyleft "file://autossh.c"))))
628
629 (define-public pdsh
630 (package
631 (name "pdsh")
632 (version "2.33")
633 (source
634 (origin
635 (method url-fetch)
636 (uri (string-append "https://github.com/chaos/pdsh/"
637 "releases/download/pdsh-" version
638 "/pdsh-" version ".tar.gz"))
639 (file-name (string-append name "-" version ".tar.gz"))
640 (sha256
641 (base32 "0bwlkl9inj66iwvafg00pi3sk9n673phdi0kcc59y9nn55s0hs3k"))))
642 (build-system gnu-build-system)
643 (arguments
644 `(#:configure-flags
645 (list "--with-ssh")
646 #:phases
647 (modify-phases %standard-phases
648 (add-after 'unpack 'patch-/bin/sh
649 (lambda _
650 (substitute* '("tests/t0006-pdcp.sh"
651 "tests/t0004-module-loading.sh"
652 "tests/t2001-ssh.sh"
653 "tests/t1003-slurm.sh"
654 "tests/t6036-long-output-lines.sh"
655 "tests/aggregate-results.sh"
656 "tests/t2000-exec.sh"
657 "tests/t0002-internal.sh"
658 "tests/t1002-dshgroup.sh"
659 "tests/t5000-dshbak.sh"
660 "tests/t0001-basic.sh"
661 "tests/t0005-rcmd_type-and-user.sh"
662 "tests/test-lib.sh"
663 "tests/t2002-mrsh.sh"
664 "tests/t0003-wcoll.sh"
665 "tests/test-modules/pcptest.c")
666 (("/bin/sh") (which "bash")))
667 #t))
668 (add-after 'unpack 'patch-tests
669 (lambda _
670 (substitute* "tests/t6036-long-output-lines.sh"
671 (("which") (which "which")))
672 #t)))))
673 (inputs
674 `(("openssh" ,openssh)
675 ("mit-krb5" ,mit-krb5)
676 ("perl" ,perl)))
677 (native-inputs
678 `(("which" ,which)))
679 (home-page "https://github.com/chaos/pdsh")
680 (synopsis "Parallel distributed shell")
681 (description "Pdsh is a an efficient, multithreaded remote shell client
682 which executes commands on multiple remote hosts in parallel. Pdsh implements
683 dynamically loadable modules for extended functionality such as new remote
684 shell services and remote host selection.")
685 (license license:gpl2+)))