
Eu tenho um script de shell rodando como root com o seguinte comando:
ssh remotehost 'su - user sh -c "source /home/user/.profile; <command>"'
Eu recebo a seguinte saída:
bash: su - user sh -c "source /home/user/.profile; <command>": Arquivo ou diretório inexistente.
/home/user/.profile definitivamente existe no remotehost. O que está acontecendo? Existe alguma outra maneira de importar o caminho definido em .profile?