Function: nrepl--ssh-tunnel-args

nrepl--ssh-tunnel-args is a byte-compiled function defined in nrepl-client.el.

Signature

(nrepl--ssh-tunnel-args DIR LOCAL-PORT REMOTE-PORT)

Documentation

Build ssh program-args forwarding LOCAL-PORT to REMOTE-PORT via DIR's host.

Returns the args as a list so the caller can pass them to start-process without shell intermediation -- this avoids any quoting hazards in the host, user or port components.

The -v option is kept so the tunnel buffer carries ssh's diagnostic output, which is handy when a forwarding attempt fails.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/nrepl-client.el
(defun nrepl--ssh-tunnel-args (dir local-port remote-port)
  "Build ssh program-args forwarding LOCAL-PORT to REMOTE-PORT via DIR's host.
Returns the args as a list so the caller can pass them to `start-process'
without shell intermediation -- this avoids any quoting hazards in the
host, user or port components.

The -v option is kept so the tunnel buffer carries ssh's diagnostic
output, which is handy when a forwarding attempt fails."
  (with-parsed-tramp-file-name dir v
    (append (list "-v" "-N"
                  "-L" (format "%s:localhost:%s" local-port remote-port))
            (when v-user (list "-l" v-user))
            (when v-port (list "-p" v-port))
            (list v-host))))