I'm trying to set up git on Synology NAS via ssh. I've created git user, set private key authentication and installed git package. I can log in successfully using private keys and have git in /opt/bin working locally (on NAS).
To make it work I changed /etc/ssh/sshd_config to have:
PubkeyAuthentication yes AuthorizedKeysFile .ssh/authorized_keys PermitUserEnvironment yes
But I still can't make it work remotely.
The problem seem to be in path used by ssh when I execute remote commands. I can confirm that because when I do
ssh email@example.com echo \$PATH
which is different from interactive shell which is giving me:
I created .ssh/environment with following content
but it still doesn't resolve the problem. Looks like its contents is not read.
I tried with environment file permissions set to -rw------- and -rw-r--r-- but also to no avail.
What else I could be missing sshd(?) in configuration that prevents it from reading user environment?