如果希望SSH登陸后先執行shell命令,可以這樣:

ssh user@ip -t "cd /data ; /bin/bash"