How to SSH into Raspberry Pi for remote administration?

Raspberry Pi, irrespective of the operating system you are using, typically comes with a SSH (Secure Shell) daemon running. Being able to SSH into Raspberry Pi can come in very handy if you want to take your Raspberry Pi usage to the next level. Many of the Raspberry Pi hacks such as overclocking, writing autostart scripts, etc. require some level of commandline work. Keeping in mind that a typical Raspberry Pi media center is typically tucked away in an entertainment center without a keyboard or a mouse, accessing through SSH may be the most convenient option. In this post, I will give you a primer on how to SSH into Raspberry Pi.

Build a Low-Cost Raspberry Pi Media CenterPrice
Raspberry Pi 4B Starter Kit with case, power adapter, and heat sinks~$82.00
Sandisk Ultra 32GB Micro SDHC UHS-I Card 98 MB/s~$8.00
SANOXY Wireless USB PC Remote Control Mouse for PC~$8.00

Enable SSH Server

Whether you are using OpenELEC, Xbian, or Raspbmc, they all provide remote SSH access to Raspberry Pi media center. The only thing you may have to do is to enable SSH server and you may do this from within the XBMC interface. Look for an SSH option in the settings and ensure that the service is enabled. For example, in OpenELEC SSH is located under OpenELEC Settings -> Services.

Openelec Ssh Options
Openelec Ssh Options

SSH into Raspberry Pi

To SSH into Raspberry, you need to know 4 things about your Raspberry Pi:

  • IP Address: You can find this in the "System Info" screen of XBMC as shown in the picture below.
  • SSH Port: Typically, an SSH server listens on port 22 on the Raspberry Pi.
  • Username: The username is "root" on OpenELEC and Xbian and "pi" on Raspbmc.
  • Password: The password is "openelec" on OpenELEC, "raspberry" on Xbian and Raspbmc.
Ssh Into Raspberry Pi
Network Information Screen Xbmc

Connecting to Raspberry Pi

The SSH client you use to connect to a Raspberry Pi SSH server depends on what system you are connecting from. On Linux or Mac you could use included terminal program. On Windows, you could use PuTTY. On Linux or Mac use the following command to initiate an SSH connection:

ssh username@ipaddress

Replace "username" and "ipaddress" with appropriate values. Upon issuing the command you will be asked for the user's password. Again, on Windows you can use Putty to SSH into Raspberry Pi. No matter which client you use, you may see a security warning about connecting to a remote host. After successful connection you will see a command prompt as shown in the picture below.

Openelec Ssh Using Putty
Openelec Ssh Using Putty

That is it. After you SSH into Raspberry Pi, you are now ready to issue commands remotely.

Be the 1 in 200,000. Help us sustain what we do.
56 / 150 by Dec 31, 2024
Join Us (starting from just $1.67/month)


Anand is a self-learned computer enthusiast, hopeless tinkerer (if it ain't broke, fix it), a part-time blogger, and a Scientist during the day. He has been blogging since 2010 on Linux, Ubuntu, Home/Media/File Servers, Smart Home Automation, and related HOW-TOs.