unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Fix for non-interactive SSH sessions
@ 2015-03-12 20:09 Ludovic Courtès
  0 siblings, 0 replies; only message in thread
From: Ludovic Courtès @ 2015-03-12 20:09 UTC (permalink / raw)
  To: GuixSD

FYI 9a10acc fixes a bug when running a non-interactive SSH session to a
GuixSD machine (running lshd), as in:

  ssh localhost uname

Before, this would result in “command not found” because $PATH would be
left uninitialized.  Now there’s a ha^W special trick in the .bashrc
skeleton to handle this use case:

  if [ -n "$SSH_CLIENT" -a -z "`type -P cat`" ]
  then
      # We are being invoked from a non-interactive SSH session
      # (as in "ssh host command") but 'cat' cannot be found
      # in $PATH.  Source /etc/profile so we get $PATH and other
      # essential variables.
      source /etc/profile
  fi

You may want to copy this to your ~/.bashrc.

Ludo’.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-03-12 20:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-12 20:09 Fix for non-interactive SSH sessions Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).