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