我在远程主机上有一个自定义配置文件脚本。当我自动连接到主机时,我想要获取它。我无法更改远程主机上的任何内容。我试过的东西都不起作用:
ssh -t myhost '. /local/scratch/scripts/rtc_profile ; bash -l'
ssh -t myhost 'bash -l /local/scratch/scripts/rtc_profile'
我还尝试了以下方法(有效),但它跳过了所有其他rcfile:
ssh -t myhost 'bash --rcfile /local/scratch/scripts/rtc_profile '
请帮助:)
发布于 2014-07-30 15:34:50
您可以将以下内容放在~/.bashrc
的末尾
if [ ! -z "$SSH_CONNECTION" ] ; then
source /local/scratch/scripts/rtc_profile
fi
https://stackoverflow.com/questions/25040872
复制相似问题