情况如下:
Windows workstation -> Linux bastion host -> Linux server
在我的Windows工作站上,我使用PuTTY到Linux主机,然后从它进入Linux服务器。
问题是,当基站主机和Linux服务器之间的身份验证是ppk身份验证,并且我不希望在我的堡垒主机上存储Linux服务器的ppk密钥时,如何做到这一点?
当根用户登录到他们的Linux服务器时,我正在加载脚本(鞭尾),这很好。问题是,现在,当我尝试从命令提示符(或crontab)运行其他脚本时,将加载初始脚本,而我想要运行的脚本看起来不是。
这就是~/.profile的样子:
if [ "$BASH" ]; then
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
fi
mesg n
source /root/menu.sh
因此,当我尝试运行bash -lc 'ruby some/other/script.rb时,我将进入在~/.profile末尾运行的脚本,即men
每次-我ssh进入我的服务器,我不断得到
ssh root@12.34.56.78
Welcome to Ubuntu 14.04.2 LTS (GNU/Linux 3.13.0-52-generic x86_64)
* Documentation: https://help.ubuntu.com/
System information as of Thu Jul 2 10:58:35 EDT 2015
System load: 0.16 Processes: 90
Usage of /: 13.5% of 19.5