如果希望SSH登陆后先执行shell命令,可以这样: ssh user@ip -t "cd /data ; /bin/bash" 转载于:https://www.cnblogs.com/zejin2008/p/7794742.html