guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fix for non-interactive SSH sessions


From: Ludovic Courtès
Subject: Fix for non-interactive SSH sessions
Date: Thu, 12 Mar 2015 21:09:12 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

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’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]