将命令作为输入传递到另一个命令(su、ssh、sh等)
su echo I should be root now:who am I exit echo done.
suexitechowho am iecho done.
ssh:
ssh remotehost# this should run under my account on remotehostsu## this should run as root on remotehostwhoami exit## backexit# back
我正在寻找解决这一问题的一般方式的答案,而这些答案并不是特定于 su或 ssh特别是。目的是让这个问题成为 典范 为这个特殊的模式。
RISEBY
宝慕林4294392
相关分类