screen: Cannot open your terminal '/dev/pts/1'

What happened

I bought a Tencent Cloud CVM to hold my DST server few days ago.

Use screen to run server.sh is perfect. I login UserA to run screen session. Then, use another device to login UserB. When I use UserB to login UserA and run screen -r to continue my screen session, following error occur:

1
Cannot open your terminal '/dev/pts/1' - please check.

How to Fix

After login in UserB, run this to get a new tty

1
script /dev/null

Reference

polygun2000’s blog