X: user not authorized to run the x server, aborting is the response to startx in terminal.

My rpi boots to the gui, and not the terminal with login prompt.

I am always the $ user,

  • Are you trying to run startx from an SSH connection? – Steve Robillard Jun 14 '17 at 6:40
  • Can you please edit your question to allow a little more clarity on what you are trying to accomplish? Your title asks how to run ssh, but your question asks about X. Are you trying to run X over an ssh session, start an ssh session or...? – ben-Nabiy Derush Jun 14 '17 at 13:47


On Windows system, you can use Putty which is a reference on the domain. In the Host Name input, enter:


On a Linux host, you can use the following command.

ssh pi@your_pi_ip_address -p 22


Not the answer you're looking for? Browse other questions tagged or ask your own question.