I always have to login a ssh shell first and start screen manually. I found a trick to login and start screen in one command. That’s very useful.
ssh -t the_server_alias “screen -d -r”
In order to run this command, you need to configure ssh so that you don’t need to type password to login. There are many tutorials out there to teach you how to do this. After you can login without password, you want to put the following line in your .bashrc
alias what_every_you_want=”ssh -t the_server_alias \”screen -d -r\”"
That’s it.