It works as expected with both approaches (changing .bashrc, and changing "--with-default-path"). WDYT? >> From fc37dd6dfb6beab9cc4e52de7b7c98946125e7cc Mon Sep 17 00:00:00 2001 >> From: Marius Bakke >> Date: Sun, 29 Oct 2017 10:31:25 +0100 >> Subject: [PATCH 1/3] gnu: openssh: Add user profiles to the default PATH. >> >> * gnu/packages/ssh.scm (openssh)[arguments]<#:configure-flags>: Add >> '~/guix-profile/bin' to '--with-default-path' arguments. >> --- >> gnu/packages/ssh.scm | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm >> index 8317f29cd..2aeeeae1e 100644 >> --- a/gnu/packages/ssh.scm >> +++ b/gnu/packages/ssh.scm >> @@ -149,7 +149,9 @@ a server that supports the SSH-2 protocol.") >> #:configure-flags `("--sysconfdir=/etc/ssh" >> >> ;; Default value of 'PATH' used by sshd. >> - "--with-default-path=/run/current-system/profile/bin" >> + ,(string-append "--with-default-path=" >> + "/run/current-system/profile/bin:" >> + "~/.guix-profile/bin") > > If sshd performs tilde expansion, that’s fine with me. Unfortunately, I think the tilde is expanded by the shell, and this made me look up how POSIX handles tilde in PATH. It appears bash, when invoked with '--posix', does *not* perform tilde expansion if it appears as the first character in a PATH element: (note 16) So while it works with "bash" as the login shell, unexpected results may occur with others. It doesn't seem impossible to patch OpenSSH to perform this expansion, though: (_PATH_STDPATH is the --with-default-path) > Should we do something similar for lsh and Dropbear? Probably. Since we have a system test, it's easy to experiment with. For now I think this .bashrc workaround might be the easiest approach, which makes the above test pass for both OpenSSH and Dropbear: