Take a look here, it looks like the same issue: Remote terminal failing on mender 3.0 server - #8 by tranchitella