將命令放入 遠程用戶家目錄下的.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 # 這個就是要執行的命令,省的以后自己登陸后總是需要執行這個