Há duas coisas a considerar aqui:
-
Parece que você não está usando
bashno servidor remoto, portanto,.bashrce.bash_profilenão serão lidos. -
sshinicia um shell de login no servidor remoto, portanto, mesmo que você estivesse executandobash,.bashrcnão seria lido. Esse arquivo é lido apenas por shells interativos e não-login.
Muitos shells de login, no entanto, leem ~/.profile . Não posso ter certeza, pois você não mencionou qual shell está usando, mas é provável que, se você adicionar essa linha ao arquivo ~/.profile (no servidor remoto), receba a variável definida:
PYTHONPATH="place/stuff/this_goes_on_forever"
Como você está executando tcsh , os arquivos de inicialização são diferentes. De man tcsh :
A login shell begins by executing commands from the system files
/etc/csh.cshrc and /etc/csh.login. It then executes commands from
files in the user's home directory: first ~/.tcshrc (+) or, if
~/.tcshrc is not found, ~/.cshrc, then ~/.history (or the value of the
histfile shell variable), then ~/.login, and finally ~/.cshdirs (or the
value of the dirsfile shell variable) (+). The shell may read
/etc/csh.login before instead of after /etc/csh.cshrc, and ~/.login
before instead of after ~/.tcshrc or ~/.cshrc and ~/.history, if so
compiled; see the version shell variable. (+)
Portanto, você deve adicionar seu comando setenv a ~/.tcshrc no servidor remoto.
Finalmente, uma vez que parece que você está mais acostumado com bash , por que você não muda o shell que você usa no servidor remoto? Basta fazer login no servidor e, em seguida, executar
chsh
Conceda /bin/bash como seu shell padrão e todos esses problemas desaparecerão. Em seguida, você poderá definir variáveis e aliases como esperado, editando ~/.profile ou ~/.bash_profile no servidor remoto.