
<aside> 💡 Originally published to https://johnneyl.ee/writes/
</aside>
/usr/local/bin missing from ssh $PATH<aside>
💡 bash: docker: command not found
</aside>
ssh [localhost](<http://localhost>) dockerNormally, your paths include your /usr/local/bin, however, in macos you'll find that if you SSH into localhost (or indeed any macos host), it is missing. Such is the case when setting up a docker profile with an ssh-based remote host, for example. 🙄
To fix this, we need to safely⚠️ enable an option that's disabled in your sshd_config called PermitUserEnvironment
/etc/ssh/sshd_config & PermitUserEnvironment PATH,LANGsshd_config & ~/.ssh/environmentsed -i '' 's/#PermitUserEnvironment no/PermitUserEnvironment PATH,LANG/g' /etc/ssh/sshd_config
echo "PATH=/usr/local/bin:$PATH" >> ~/.ssh/environment
echo "setenv PATH /usr/local/bin:$PATH" >> ~/.ssh/environment
<aside>
💡 🥳 ssh [localhost](<http://localhost>) docker works!🥳
</aside>
Now go and cluster all your macbooks together with docker! 🥳