Using SSH

Before you can connect, you need to know the IP address of your Pi. In XBMC this is avilable under Settings -> System Info -> Network. If you are on another distribution, or XBMC fails to start, log in to the Pi and then type

sudo ifconfig

you will get output like

eth0 Link encap:Ethernet HWaddr b8:27:eb:1c:f1:81
inet addr: Bcast: Mask:
inet6 addr: fe80::ba27:ebff:fe1c:f181/64 Scope:Link
RX packets:442 errors:0 dropped:0 overruns:0 frame:0
TX packets:241 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:41480 (40.5 KiB) TX bytes:32093 (31.3 KiB)

lo Link encap:Local Loopback
inet addr: Mask:
inet6 addr: ::1/128 Scope:Host
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

you need the IP address on eth0, if you have the ethernet lead plugged in – in this case.

Linux And OS/X

Remote Shell

If you wish to connect from Linux or OS/X, open a terminal session and simply type

ssh <username>@<ip address>

replacing <username> and <ip address> accordingly – the username is usually pi in the Pi distributions based on the Debian image, including RaspBCM. So in the case above it would be

ssh pi@

the first time you connect this may ask you something like

The authenticity of host ' (' can't be established.
RSA key fingerprint is ad:4d:14:4d:74:19:fa:f1:fa:c6:ee:81:36:29:be:f4.
Are you sure you want to continue connecting (yes/no)?

if so, just answer “yes”. This should then prompt you for the password – the default for the pi user is raspberry (all lower case) and you should then be logged into your pi.

Copying Files To Or From The Pi

In addition to the ftp server, you can also use scp to copy files to or from the pi from a Linux or OS/X shell. The command is

scp <source> <destination>

The local file is referenced as normal in the shell.
The remote location is referenced thus:

<username>@<ip address>:<path>

The path can be absolute, such as /usr/tmp/ or it can reference the home directory by using ~/ (this, and its subdirectories, are probably the only locations the pi user has write access to). If you just specify a directory the original filename will be preserved – it’s usually a good idea to end the path with / in this case, as it will give an error if the directory doesn’t exist, otherwise it will use the intended directory name as the destination filename. Otherwise you can, if you so desire, specify an alternative name for the file.

A couple of examples:-
copying a zip file from the local machine to the pi’s home directory

scp /data/Downloads/RaspberryPi/ pi@

copying a log file from the pi, to the current directory on the local machine

scp pi@ ./


Remote Shell

There’s a good Windows SSH client called PuTTY (note the legal warning regarding use of encryption software). Download putty.exe and run it.
In the “Host Name (or IP address)” box put the IP address of the server
Putty Connecton
The first time you connect it will ask you if you trust the host – select [Yes]
Putty Fingerprint
Then you can log in.
Putty Login
The default username is pi and the password raspberry (all lower case) and you should then be logged into your pi.

Copying Files To Or From The Pi

On that page there is also PSCP. Download pscp.exe and open a command prompt. You can use the pscp.exe in a similar manner to the Linux scp command, above.
Note that:-

  • it doesn’t seem to accept ~/ as a shortcut to your home directory, but specifying no path puts the file into your home directory.
  • pscp.exe either needs to be in your path or you need to specify the path to it, for example:-

C:\Downloads\pscp.exe pi@

will copy the file in your current directory to the home directory on the Pi.
There is also a general reference at