将命令放入 远程用户家目录下的.bashrc里边。如下:

# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=

# User specific aliases and functions

sudo su # 这个就是要执行的命令,省的以后自己登陆后总是需要执行这个


作者:Star-Hitian,转载请注明原文链接