Can't connect with VPS running Ubuntu server 16 with x2go

earlier today (or yesterday -_-) I've rented a VPS (from aruba cloud) for a personal project. I've managed to establish SSH connection in putty so I can run shell commands alright. What I want to do now is get access to my VPS's graphical interface. I've been trying to use X2go (from a computer running windows 10) and it returns error message:

ttyname failed: Inappropriate ioctl for device.

After googling this for a while I've found out that this means that some device has been called in a way that it can't interpret, but I can't figure out what device (networking card?) exactly is the source of this issue, much less how to resolve it. Does anybody know how to do that using terminal commands only?


In your /home/user/.profile add the following line :

tty -s && mesg n

... and remove any other "mesg" line which is the root cause of the problem